Hi,

On Tue, 2010-12-07 at 23:11 +0100, Sebastian Till wrote:
> Hi,
> 
> > What are you attempting to do and how are these members causing problems
> > for you?
> 
> > could you be a little bit more specific as to what your threads are
> > doing. These are internal elements that the apps does (should) not
> > touch.
> 
> I'm sorry. I really didn't explain that much.
> 
> My application consists of two threads. The main thread does the user input 
> and
> rendering and the second thread loads a certain amount of *.obj files (and 
> adds
> the results to the scene node), deletes them afterwards and repeats this 
> loading
> and deletion cycle over and over again. This second thread synchronises with 
> the
> main thread after each loading or destruction of a single *.obj file or node,
> respectively.
> This simple scenario creates memory leaks, though. Printing the living fc's to
> the console shows that States, StateChunks, TextureChunks and so on are still
> living and dominating the output.

ok.

> A user called Marc Hofmann already noticed similar or even equal problems. One
> of the answers he received was that the StatePtr of the osg::Material isn't
> contained within an SField and the comments in the Material.h right above that
> StatePtr read that it's not thread safe.

the main problem is that this is (at least) partially broken for 1.x.
We spend considerable amount of time on it while doing 2.x.

That is also the problem fixing it, it is very hard to predict side
effects ;(

> I was curious now if I would be able to fix the memory leaks by putting these
> Ptrs into SFields. Although, the more I think about it, the more I don't
> understand why this StatePtr should cause this issues.

it actually should not really make a difference. It sounds more that 
something with the ref counting is odd. 

Do you have sample code you can share (off list). Otherwise it will 
take a second to reconstruct what your app does.

kind regards
  gerrit





------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to