On Sat, Oct 18, 2008 at 10:50, Vincent Torri <[EMAIL PROTECTED]> wrote:

>
>
> On Sat, 18 Oct 2008, Ivan Vucica wrote:
>
>> Vincent, those sentences refer to a _*currently running_* application, not
>> to a recently terminated. This paragraph implies that WindowsCE _does_
>> perform a cleanup.
>>
>
> Then that doc is completely stupid. A memory leak occurs when the memory,
> used by a program, is not totally freed by the program when it finishes. Of
> course, a program uses memory when it is running. Of course, it can allocate
> more and more memory during time, but it can do that because it *must*
> allocate that mem (for a reason or another).


I disagree. See, "memory leak" refers when some portion of program is
repeatedly executed without freeing its memory. For example, various objects
in OOP may allocate memory in their constructor and not free them in the
destructor. That's when a "memory leak" occurs. Valid example is creating
particles in a space simulation, and when their TTL expires, forgetting to
destroy their data. This would accumulate within minutes in any game which
uses particles a lot; for example, a space simulation for displaying ship's
exhaust. With Apache, you would perhaps only notice it after a few days,
since you have to wait for the leak to accumulate.

From the OS perspective, not freeing application memory upon exit is a
memory leak. But from application's perspective, not freeing memory whenever
possible also causes memory leaks.


>
>
>  Adding emphasis:
>> Typically, the operating system __can clean up__ after a program which
>> leaks memory __after it terminates__.
>>
>
> If that OS frees the memory when the app finished, good, then.
>
> Vincent
>



-- 
Regards,

Ivan Vučica

OBJECT Networks :: www.objectnetworks.net
Cateia Games :: www.cateia.com
Zagrebački računalni savez :: www.zrs.hr
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to