Pointer/object life time

Hello all,

I added some classes to ns-2 simulator for my project. It would involve several pointers and vectors. During simulation, objects get destroyed before simulation ends. I would appreciate if someone shares me the life time of objects in C++ or how Linux system is handling applications that consume large memory and CPU. My project also involves tcp communications. I will share some part of the code if required.
thanks,
Scope of variables http://cplusplus.com/doc/tutorial/variables/
If you create something with new it will exist until you delete it. It doesn't matter if you can't reference it anymore (memory leak)

how Linux system is handling applications that consume large memory
swapping.
Topic archived. No new replies allowed.