Re: Allocators and memory reclamation




"Dmitry A. Kazakov" <mailbox@xxxxxxxxxxxxxxxxx> wrote in message
news:lneim0ua86uj$.5q4owyndn3kj$.dlg@xxxxxxxxxxxxx
On Mon, 28 Jan 2008 05:49:35 -0800 (PST), Maciej Sobczak wrote:
....
Another question relates to the order of finalizing objects. If the
storage pool is torn down when the access type goes out of scope, is
the order of finalizing objects guaranteed?

AFAIK, it is not. Why should it be?

I have no idea what Dmitry is talking about. The language does require
finalization of objects when the owning access type goes out of scope.
(Another good reason to avoid conversions between access types!)

In particular, read 7.6.1(11/2) [which defines "finalization of the
collection".] Note that there is no requirement of an order on the
particular allocators, only that they all get finalized at the point of the
type declaration (in reverse, of course).

Randy.


.



Relevant Pages

  • Re: Ada OS based on Minix3
    ... don't know whether the object is in a pool, ... The object here is of a pool-specific access type ... construction can be added without changing existing language behaviour. ... The finalization can collect the target object if the access type ...
    (comp.lang.ada)
  • Re: Allocators and memory reclamation
    ... storage is taken from the storage pool associated with the Int_Ptr ... the access type itself goes out of scope and it is also when the ... and reclaim the memory, but it is not required to. ... Finalization of heap objects has nothing to do with storage pools. ...
    (comp.lang.ada)
  • Re: does python have useless destructors?
    ... I tried out a technique yesterday that shows it's possible to have reliable ... the module is currently called *scope*. ... I used the term 'finalization' even though technically not rigorous. ... some of the standard python library classes in scope.NeedsFinalization. ...
    (comp.lang.python)
  • Re: unexpected behaviour of finalize
    ... to locally declare a singelton object of a class derived from ... and to override the Finalize method. ... When the sigelton object leaves scope, ... Do_Something Finalization 0 ...
    (comp.lang.ada)
  • Re: unexpected behaviour of finalize
    ... to locally declare a singelton object of a class derived from ... When the sigelton object leaves scope, ... Do_Something Finalization 0 ... This looks like a pretty clear compiler bug, ...
    (comp.lang.ada)