I’ve heard that Finalize methods should be avoided. Should I implement Finalize on my class?
Actually,An object with a Finalize method is more work for the garbage collector than an object without one. Also there are no guarantees about the order in which objects are Finalized, so there are issues surrounding access to other objects from the Finalize method. Finally, there is no guarantee that a Finalize method will get called on an object, so it should never be relied upon to do clean-up of an object’s resources.
Leave a Reply
You must be logged in to post a comment.