Hi,

  Are you using Visual Studio? There is a free tool called Visual Leak
Detector (https://vld.codeplex.com/) that is very useful for detecting
leaks. And it is much more precise than Task Manager regarding to leaks in
the application.

  I said that because IupFileDlg uses a native dialog from Windows API that
loads a lot of stuff. Maybe that stuff is cached in the system memory for
future reuse.

Best,
Scuri


On Tue, Jan 24, 2017 at 3:08 PM, Andrew Robinson <arobinso...@cox.net>
wrote:

> Hello,
>
> I am running an app with the following code:
>
> int fnSrcFile_cb(void) {
>   Ihandle *filedlg = IupFileDlg();
>   IupSetAttribute(filedlg, "DIALOGTYPE", "OPEN");
>   IupSetAttribute(filedlg, "EXTFILTER", "Text Files|*.txt|All Files|*.*|");
>   IupPopup(filedlg, IUP_CENTER, IUP_CENTER);
>   if (IupGetInt(filedlg, "STATUS") != -1) {
>     char* filename = IupGetAttribute(filedlg, "VALUE");
>     IupSetStrAttribute(txt1,'VALUE',filename) }
>   IupDestroy(filedlg);
>   return IUP_DEFAULT }
>
> With Task Manager open, the app starts out taking up 5K of memory, but as
> soon as I click on the control button that calls the code above, it jumps
> to ~15k, even if all I do is open the dialog and click on cancel. If I keep
> on opening and then canceling the file dialog, the memory slowly creeps up
> in size. Closing the app leaves a ~12k stub in memory, indicating it wasn't
> actually destroyed. If I do not call the file dialog, the app opens and
> closes, leaving nothing behind in memory.
>
> I am using Windows7 and the latest version of IUP (3.21).
>
> Thanks,
>
> Andrew
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to