Re: Problem with memory leaks
Date: Tue, 18 May 2004 08:49:22 +0100
I think what you are doing mostly likely is allocating a mesh to the
device each time round the RenderSceneGraph loop - have a check. Objects
allocated to the device do *not* get GC'd when they go out of scope
(although there is a switch to turn this on) unlike normal managed
objects. If you have to allocate memory like this each time then call
Dispose() on each object before it goes out of scope!
Hope this helps and offers a different view on what everyone else in
this forum has been saying.
- Re: Local variables within looping constructs
... > My simplistic mind tells me that having local variables within looping ... Chances are that allocating 12 bytes of stack space takes no more time ... variables are created when their scope is entered and cease ...
- Re: difference between stack & heap (general, for a newbie)
... completely separate from a "heap" as a memory allocation pool. ... and what is the scope of data when allocated from the ... allocating dynamic memory might be slow. ... some auto variables might have space reserved ...
- Re: Stack vs. Heap
... Typically, if an element does not need to exist beyond the scope of its variable, you are ... much better off allocating it on the stack instead of the heap. ... have a lifetime beyond the local scope must be allocated on the heap. ...
- Re: [PATCH 1/4] Support named cgroups hierarchies
... we are allocating a new root, ... If we find a superblock with the right name then we use ... Because it's not needed for the entire scope of the function. ...