Re: Memory management clarification



Maciej Sobczak wrote:
Trying to learn a bit of Ada I came across a statement that memory allocated from the pool will be implicitly reclaimed when the acces variable used to reference it goes out of scope.

this is called garbage collection. can you tell us where you read this statement ?


if i remember right, garbage collection is _allowed_ by the standard, but not _defined_ in the same standard.

the only 2 compilers i can think of implementing a GC are JGNAT and MGNAT, 2 niche compilers targeting the JVM and CLI, mainly because the GC is a feature of their target platform. i'm not aware of any other implementation of a garbage collector, but i may be wrong...

--
rien
.



Relevant Pages

  • Re: general performance question
    ... (It seems to me that the JVM should be free to null out the reference once it goes out of scope, or even if it's in scope but flow analysis makes it clear that it can't be used any more, but that was a minority opinion.) ... If you create an Object in a loop and then reassign another Object to the same reference in the loop, the first Object is eligible for garbage collection. ...
    (comp.lang.java.programmer)
  • Re: argument returning
    ... because there is still a live reference to it. ... long as the variable is in scope, ... The object will only be eligible for garbage collection ... Matt Humphrey matth@xxxxxxxxxxxxxx http://www.iviz.com/ ...
    (comp.lang.java.programmer)
  • Re: GC and active sockets, and Pinned Memory
    ... once an object goes out of scope and effectively ... is unreachable through any means available to developer, ... reference A goes away but reference B is still there. ... >> Garbage collection timer is there to ensure garbage collection is forced ...
    (microsoft.public.dotnet.framework)
  • Re: GC and active sockets, and Pinned Memory
    ... Objects don't go out of scope, references do go out of scope. ... Your local references go out of scope, but as YOU passed a NetworkStream ... thread pool which stores the NetworkStream reference for later use, ... >>> Garbage collection timer is there to ensure garbage collection is ...
    (microsoft.public.dotnet.framework)
  • Re: Garbage Collection - dim x as y versus dim x as new y
    ... thank you michel. ... > Well if the object goes out of scope it will automaticly be released ... >> with respect to garbage collection. ... >> it isn't so much HOW an object reference ) ...
    (microsoft.public.dotnet.languages.vb)