Hi Tobias,
On Sat, 2006-03-04 at 14:12 +0100, Tobias Kilian wrote:
...
>
>
> This is similiar to what Oliver Abert did it in the tutorials. It does
> work, though I am not sure if it is water-proof.
> So I would be glad if one or another could have a look at my code.
I looked over it briefly and it looks ok to me.
> And there seems to be memory leaks, I thought the highResImages would be
> killed out of memory if i set it back to
> beginEditCP(_simpleTexturedMaterialPtr);
> _simpleTexturedMaterialPtr->setImage( _lowResTexture);
> endEditCP(_simpleTexturedMaterialPtr);
> Is that so?
If there is no other reference to the image, yes.
> And when i terminate the thread before it is done, it could just be
> loading the image and i dont know if termination is safe then.
Well, terminate really means that. The thread is killed and has no
chance of doing anything, including cleaning up. Is if that happens you
will leak memory. It would be safer to let the thread finish loading the
image and then have it finish itself. That would not be quite as
efficient as it would have to load the image, but I don't see safe way
of stopping the thread without changing the image loader to support it.
> Perhaps the leak is somewhere else, i'll try to get a non-crashing
> shutdown to test that :-)
The place where it crashes might be an indication of where something is
going wrong.
Hope it helps
Dirk
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users