Backround work by compiler/os to alloc memory
I want to know what background work is done by compiler/OS when i dynamically create an object .
my concern about what data structure it use to create the objects and allocate memory and when those data structures destroy can i explicitly destroy those data structures
when i create a sub class object compiler create a virtual table if super class have a virtual function
Thanks and Regards
Re: Backround work by compiler/os to alloc memory
You only need to concern yourself with the object itself. Every new X must be matched with a delete X. If the compiler adds extra code to allocate additional structures when you call new X, it will also add extra code to deallocate those structures when you call delete X. You cannot explicitly deallocate those extra structures yourself.
|All times are GMT +5.5. The time now is 03:44.|