C, C++, C++/CLI

C++ Tutorial – Almost error cases that you got when try to delete a pointer

Without some code of where things are crashing, we can only speculate.  There are a million things that could be going wrong, such as Deleting memory twice (especially likely if you copy pointers around) Deleting a pointer that was never initialized Deleting a pointer that was assigned to garbage Deleting a pointer to memory that… Continue reading C++ Tutorial – Almost error cases that you got when try to delete a pointer

C, C++, C++/CLI

C++/CLI Tutorial – How to monitor managed object in C++ program

Almost C++ programmer want to manage all object they created. But when they use gcnew in C++/CLI to create objects, it seems they were not able to control these objects and that makes them feel uncomfortable. We can only set these object to nullptr and cannot delete it by calling delete, this is responsibility of GC. We… Continue reading C++/CLI Tutorial – How to monitor managed object in C++ program