comp.lang.ada
 help / color / mirror / Atom feed
From: Fabien Garcia <fabien.garcia@laas.fr>
Subject: Re: access / freeing memory
Date: Tue, 16 Jul 2002 13:51:20 +0200
Date: 2002-07-16T11:50:20+00:00	[thread overview]
Message-ID: <3D3408B8.4070001@laas.fr> (raw)
In-Reply-To: pan.2002.07.16.12.50.51.485455.1467@gmx.net

Jan Prazak wrote:

> Let me know if I did understand this correctly: if I have a "head", which
> can access nodes (in a list), and I create some nodes and connect
> them,for instance:
> 
>   head -> 1 -> 2 -> 3 -> null
> 
> and if I do nothing (so the program will end), the operating system (or
> compiler???) does the deallocation automatically, just because "head" is
> a variable. It then goes, starting at head, through the whole list and
> frees the memory occupied by every node. Right?


In fact when your program terminates all the memory allocated to the 
process by the OS is freed. It's not a question of referenced
or unreferenced menory. The deallocation doesn't goes "down" your list
throught each node, it just erase everything.

Hope it will help a bit, sorry for not being able to answer to the 
others questions (I will be interested by others answer thought :) )

Fabien




  reply	other threads:[~2002-07-16 11:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-16  0:52 access / freeing memory Jan Prazak
2002-07-15 22:22 ` tmoran
2002-07-16 13:54   ` Jan Prazak
2002-07-16 11:51     ` Fabien Garcia [this message]
2002-07-16 22:59       ` Jan Prazak
2002-07-16 15:42     ` Darren New
2002-07-16 22:59       ` Jan Prazak
2002-07-17  5:22         ` Simon Wright
2002-07-17 21:36           ` Jan Prazak
2002-07-24  0:25       ` David Thompson
2002-07-23  6:15   ` Kevin Cline
2002-07-18 18:22 ` chris.danx
2002-07-19 13:32   ` Jan Prazak
2002-07-19 23:50     ` chris.danx
     [not found] <mailman.1026804243.16337.comp.lang.ada@ada.eu.org>
2002-07-19  1:42 ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox