destructor
C# class: Do logging / housekeeping, should I use a destructor?
I have a c# class. Whenever this class is not in use anymore I want to do some things. For example log the current state and so on.[详细]
2023-03-23 09:40 分类:问答Destructors and inheritance in C++?
I use Borland C++ Builder. And i had o problem #include <Classes.hpp> class TMyObject : public TObject[详细]
2023-03-23 06:45 分类:问答Explicit destructor in templated context
I want to explicitly destroy a vector i开发者_如何学Cn a templated context. The following works for me (GNU C++ 4.3, 4.4 and Clang++ 1.1):[详细]
2023-03-23 01:27 分类:问答Can one deallocate memory in a destructor if they allocated memory within a private function in C++?
I am trying to define a class in the global scope which contains some dynamically-allocated arrays.When the class\' constructor is called, the program does not have access to user-defined parameters r[详细]
2023-03-22 23:37 分类:问答How to force deletion of a python object?
I am curious about the details of __del__ in python, when and why it should be used and what it shouldn\'t be used for.I\'ve learned the hard way that it is not really like what one would naively expe[详细]
2023-03-22 08:17 分类:问答When do static objects in WCF server get disposed?
Here is my scenario: I have a static object which will connect to a concurrent license service to get a license. I will need this license on some of the non-static methods in my WCF service.[详细]
2023-03-22 07:09 分类:问答Destructor not being called when leaving scope
I am learning memory management in C++ and I don\'t get the why only some of the destructors are called when leaving scope. In the code below, only obj1 destructor is called when myfunc ends, not for[详细]
2023-03-21 05:04 分类:问答Do you need to remove an event handler in the destructor?
I use some UserControls which get created开发者_JAVA技巧 and destroyed within my application during runtime (by creating and closing subwindows with these controls inside).[详细]
2023-03-19 21:13 分类:问答GNU GCC (g++): Why does it generate multiple dtors?
Developing environment: GNU GCC (g++) 4.1.2 While I\'m trying to investigate how to increase \'code coverage - particularly function coverage\' in unit testing, I\'ve found that some of class dtor se[详细]
2023-03-18 13:34 分类:问答Where to call DestroyWindow() of an MFC dialog?
I\'m curently working on dialogs in an M开发者_运维百科FC application and I\'m – admittedly – quite new to MFC.[详细]
2023-03-18 12:26 分类:问答