Re: Memory Leak
Re: Memory Leak
- Subject: Re: Memory Leak
- From: "MacArthur, Ian (SELEX GALILEO, UK)" <email@hidden>
- Date: Mon, 26 May 2008 17:52:51 +0100
- Thread-topic: Memory Leak
> Yes, the OS will clean
> everything up, but if execution reaches the end of main() and
> memory is
> still hanging around, there is no doubt that it is a leak.
Well, not necessarily. For example, if you have a large number of C++
objects, then you can call the destructors on exit. Or you can just
exit.
Calling the destructors takes time (often a significant amount, like 20
seconds or so.)
The later can mean there's still memory hanging around at the end of
main - but it isn't a leak as such, since it is intended, and the OS
will clean up for you (and quicker than the destructors can run!)
SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden