c# - When should I create a destructor? -


for example:

public class person {     public person()     {     }      ~person()     {     } } 

when should manually create destructor? when have needed create destructor?

the c# language calls these "destructors", people call them "finalizers" since .net name , reduces confusion c++ destructors (which quite different).

how implement idisposable , finalizers: 3 easy rules


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -