Version française
Home     About     Download     Resources     Contact us    
Browse thread
Finalisation in 2.02
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Patrick Goldbronn - SYSCO <patrick.goldbronn@c...>
Subject: Re: Finalisation in 2.02
Jacques Garrigue wrote:
> 
> From: skaller <skaller@maxtal.com.au>
> 
> > The problem is that when I create an object with alloc_final(_,_,0,1),
> > the finaliser is not called on termination. Using 1,1 seems to cause
> > it to be called almost immediately.
> 
> The meaning of the two last parameters is a fraction giving the
> maximum number of times allocation may be done before GC is
> called. 0/1 means that the GC urgency count is not incremented, so
> this may take an indefinite time. 1/1 means do GC on each allocation.
> 
> As an example, in LablGtk all widgets allocations are finalized, with
> a parameter 1/200. That is, the GC will be called at least every 200
> times I build a pointer to a GtkObject, so that I may not have more
> than 200 stall pointers. This may need some more tuning, but the
> number of pointers you create depends very much on your application.
> 

What's append when we change the finalization parameters values ?
We alloc an object of type toto with 1,200 and another object toto with
9,146

It's the last number which is keep by GC (here 146) and erase previous
value (200)
The same with the pound (1 and 9) or they are adding -> 1+9 = 10 < 146 ?

Thanks,

-- 
#####################################
# Patrick GOLDBRONN                 #
# CEA - DRN/DMT/SYSCO               #
# CE-Saclay, Bâtiment 460           #
# 91191 GIF/YVETTE CEDEX (FRANCE)   #
#                                   #
# Tél : 01 69 08 73 55              #
# Fax : 01 69 08 96 96              #
#####################################