I had previously been calling gc.collect several times in each
begin_round(), to no avail. Keeping around a list of weakrefs shows that
 the objects have nothing referring to them, but aren't being deleted..
ie, gc.show_referrers( landref() ) == [] .. so I'm really not
understanding what's going on here.

I've only got 3 textures (the grass, ground, and snow from the
tutorials), so that's not a memory issue (yet).

Could this possibly be due to Python leaving control of these objects to
Pyrex? I admit I'm not really familiar with Pyrex, but I'm thinking of
the equivalent of Boost.Python's return policies, where you can set
whether C++ or Python is responsible for deleting objects..


Also - I'm seeing the same rendering issue with Land objects as
Snaipperi, where non-zero edges of heightmaps are shaded darker than the
rest, and rendered slightly lower than they should be.. I thought
perhaps this would be changed in the new landscape renderer in 0.10.2,
but it still seems to be a problem.. any thoughts?

j

Jiba wrote:
> On Mon, 23 Jan 2006 00:38:50 -0800
> Justin <[EMAIL PROTECTED]> wrote:
> 
> 
>>Hi all,
>>
>>I've been working on a paging world system in soya that will allow me to
>>create very large "continuous" worlds with objects and landscapes being
>>created and deleted on the fly. The problem is, it looks like my objects
>>(right now only soya.Land objects..) aren't actually being deleted. I've
>>verified that they've been removed from the scene World, and that I'm
>>not holding any references to them, but they still don't seem to be
>>getting garbage collected. Watching my process's memory size shows it
>>going up and up, even though the number of Land objects in the scene is
>>staying the same.
>>
>>Is there some internal collection in soya that's holding on to
>>references to these objects? Or some other reason they might not be
>>getting gc'd? (gc.garbage doesn't show anything, so it doesn't look like
>>a circular reference __del__ problem...)
> 
> 
> There is no internal collection for Land ; although there are some for shapes 
> and materials, thus if your Lands use different materials and textures, it 
> may be the material that consume memory.
> 
> Due to circular references, the deletion of a Land may not occur immediately 
> but at the next (or maybe the second next) garbage collection. You can force 
> it by calling gc.collect() twice.
> 
> You can use weakref to track your Land : create a ref to it, and then check 
> whether the Land is dead or not.
> 
> Jiba
> 
> _______________________________________________
> Soya-user mailing list
> [email protected]
> https://mail.gna.org/listinfo/soya-user

Reply via email to