[osg-users] osg-users Digest, Vol 34, Issue 32

lilinx at 21cn.com lilinx at 21cn.com
Mon Jul 23 03:03:50 PDT 2007


hi Robert,

	I look this memory in windows "TaskMgr", is not in VS IDE.
In addition, when I minimize the console window, the memory 
decrease to normal level soon(eg. 20M to 5M), then increase 
slowly per frame again(eg. 5M--5.1M--5.2M...200M). It seen
that until I minimize the console window, the cached objects are
really deleted.

======= 2007-07-21 17:29:40 ÄúÔÚÀ´ÐÅÖÐдµÀ£º=======

>HI Lilinx,
>
>The difference in DrawThreadPerContext and
>CullThreadPerCameraDrawThreadPerContext is that they use an
>osg::DeleteHandler to cache the last two frames worth of deleted
>objects to avoid issues with objects being deleted which others
>objects have handles to them.  This caching is flushed on each frame
>to get rid of objects older than 2 frames.
>
>In 2.0 during clean up more objects than usually get placed in the
>DeleteHandler and aren't flushed explicitly, but flushed when the
>DeleteHandler goes out of scope.  A problem here can arise in the if
>say osgUtil objects are in the DeleteHandler waiting to be deleted and
>the osgUtil library gets unloaded then a call to delete these objects
>will be undefined.  This may be where the memory leak is reported, or
>perhaps its simply the the memory detector is make its decision about
>what is a memory leak too early in clean up - this has been a known
>issue under VS for a long while.
>
>Since 2.0 I have clean up the way that the DeleteHandler is used on
>exit, so that when osgViewer unloaded its automatically flushes the
>DeleteHandler and switches off its caching so that all objects delete
>right away.   I don't know if this will affect the memory leak
>reporting though, as VS' memory leak detection is a bit flaky.
>
>Robert.
>
>
>
>
>
>On 7/21/07, lilinx at 21cn.com <lilinx at 21cn.com> wrote:
>> osg-users-requesthi,all
>>
>> memory leak problem
>>
>> I work on windows xp, 2cpu(Pentium (R) D CPU 2.8GHz), Nvida 7300GT grahpic card, osg2.0 compile with vc71.
>> I test :
>>      1. osgviewer.exe cow.osg --SingleThreaded  ,                              no memory leak
>>       2. osgviewer.exe cow.osg --CullDrawThreadPerContext  ,                    no memory leak
>>      3. osgviewer.exe cow.osg --DrawThreadPerContext  ,                        has memory leak
>>      4. osgviewer.exe cow.osg --CullThreadPerCameraDrawThreadPerContext  ,     has memory leak
>>           5. osgviewer.exe cow.osg                                                    ,     has memory leak  (auto select DrawThreadPerContext)
>>
>> I test on other single cpu computer, the differences is "osgviewer.exe cow.osg" no memory leak(auto select SingleThreaded).
>>
>> lilinx
>> ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡lilinx at 21cn.com
>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>_______________________________________________
>osg-users mailing list
>osg-users at lists.openscenegraph.org
>http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>__________ NOD32 2411 (20070721) Information __________
>
>This message was checked by NOD32 antivirus system.
>http://www.nod32cn.com
>
>

= = = = = = = = = = = = = = = = = = = =
			

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ÖÂ
Àñ£¡
 
				 
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡lilinx
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡lilinx at 21cn.com
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2007-07-23



More information about the osg-users mailing list