Hello Marc,

Marc Hofmann wrote:
>  > Can you try the attached patch, please?
> 
> I applied the patch and it worked, the code runs now without crashes or 
> memory leaks. Unfortunately the problem occurs on a different place as 
> well. Is this a more general problem?

hm, yes and no: it is general in the sense that all the ref count code 
is written by hand for 1.x, so there is space for bugs to hide in ;)
The case you run into is quite specific to Material and the way it 
handles the State object it holds. It is fairly unique because that 
StatePtr is not kept in a field, but instead each aspect copy has its 
own (and that object itself is mirrored between aspects :-/ ).

The Material is destroyed in the render thread and from there the d'tors 
for the two copies are called, but that means that the last references 
to the Chunks go away in the render thread and are in that changelist. 
They never get merged back to the create thread (which should be fine, 
but isn't in this case :( ) and so the Chunks are not clean up.

With only one ref count shared across all aspect copies I'm not sure if 
this can be fixed in 1.x, I'm currently double checking that it works as 
expected in 2.0.

        Cheers,
                Carsten

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to