[info-performer] calling pfFrame causes memory leaks in Windows.

Date view Thread view Subject view Author view

From: fobefut fobefut (fobefut++at++msn.com)
Date: 06/30/2003 04:42:53


Hello, Performer users.

I'm now developing MFC-based visual application using Performer.
The environment I have used is described below.

1) Visual C++ 6.0 (service pack 5)
2) Windows 2000 or XP
3) MFC-based windows application

During combining MFC and Performer libraries into one application,
I performed three cases of tests.

1. Console Performer program (without using MFC)
2. MFC based program using Performer routines as thread
3. MFC based program with Performer routines melted in the MFC routines

After testing a several times, I've got the following results.
"1" works well without any problem.
"2" dies after some time because of heavy memory leaks.
"3" also have a problem about memory leaks.

Especially, I programmed "3" for MFC-based windows as below.

                win->setWinType(PFPWIN_TYPE_X);
        win->setWSWindow(NULL, AfxGetMainWnd()->GetSafeHwnd());
        win->setWSDrawable(NULL, GetSafeHwnd());

I inserted this code in the creation of view class, as refered in other
sample code.
And, for drawing scene graph, I inserted "vgSync" and "vgFrame" in "OnDraw"
routine.
(This means that drawing process can be performed by user event, not real
time.)

I checked that the memory leaks-increasing memory usages-arise from
"vgFrame".
Even though not adding any node into scene graph, calling "vgFrame" causes
memory leaks.
(I checked this phenomenon by memory usage in Task manager.)
Eventually, "3" will die because of memory leaks...
I experienced this abnormal abortion by inserting window timer causing
specific-rated screen refresh.

This problem may be highly specific to MFC windows system,
so I hesitate to ask this question in this mailing list.
But, if there is any suggestion or advise, please let me know...

Thanks for reading.
(By mistake, I registered incomplete mail into mailing list.
If the sgi staff can manage the mailing list, please delete the previous
one.
I apologize my mistake if one have already read.)

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Jun 30 2003 - 04:44:27 PDT