Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Windows
 Charting and Real-Time Graphics Tools for Windows
 Memory Cleanup
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

senkyoshi

6 Posts

Posted - 05 Oct 2005 :  14:42:04  Show Profile  Reply with Quote
In my progam I use WGCompressData a few times. I also use WGLinePlot. These are used in Visual Basic 6.0. I followed the debugger and found that each time these functions are called memory being used (being watched in Windows Task manager) increases. Is there a way to ensure that this memory is freed after it is being used so I do not have any memory leaks?
The reason wh yI ask this question is because I am experiencing leaks in my application and I have accounted for (deallocated) all memory that is allocated by my personal coded portions and still have this leak. Thanks for your help.

quinncurtis

1164 Posts

Posted - 05 Oct 2005 :  15:41:50  Show Profile  Reply with Quote
If you are sure you are done using the graphics routines you can call WGCleanup. See the description in the manual.
Go to Top of Page

senkyoshi

6 Posts

Posted - 05 Oct 2005 :  17:26:23  Show Profile  Reply with Quote
That looks like a useful function call for my situation. Can you tell me which dll that is in? I can't seem to find it in the manual. Thanks for your help.
Go to Top of Page

quinncurtis

1164 Posts

Posted - 05 Oct 2005 :  18:48:51  Show Profile  Reply with Quote
The WGCleanup routine is described in the Charting Tools manual. If you are using the Real-Time Graphics routines you must call the similar function WRCleanup instead, as described in the Real-Time Graphics manual.
Go to Top of Page

senkyoshi

6 Posts

Posted - 06 Oct 2005 :  14:52:48  Show Profile  Reply with Quote
I am still having a hard time getting WGCleanup to work. I get an error when running the program saying that it cannot find the entry point for the function in the dll. Can you please tell me which dll this is supposed to be in? I have looked in the manual and can not find which dll it belongs to. Or maybe there is another problem. Any suggestions? I am using the function just like it says in the manual:

Call WGCleanup(TopDesc, False)

Thanks
Go to Top of Page

quinncurtis

1164 Posts

Posted - 06 Oct 2005 :  17:26:11  Show Profile  Reply with Quote
The function prototype is found in VBGlobal.Bas and the implementation in the VBHookR3.DLL. Look at the Easygraf example, it is called in the Form_Unload function.

If you are using any of the Real-Time Graphics Tools routines (any that start with WR) you MUST use WRCleanup instead.

Go to Top of Page

senkyoshi

6 Posts

Posted - 10 Oct 2005 :  19:10:48  Show Profile  Reply with Quote
I am trying to use WGCleanup but when it gets called Visual studio crashes. Sorry it does not give me an error number. I am declaring it this way:

Declare Sub WGCleanup Lib "vbhookr3.dll" (TopDesc As Long, ByVal bFreeData As Long)

and then calling it in Form unload:

Call WGCleanup(TopDesc, False)

Any ideas why this is not working?

Thanks for your help
Go to Top of Page

quinncurtis

1164 Posts

Posted - 10 Oct 2005 :  20:30:32  Show Profile  Reply with Quote
I do not understand why you need to make a special declaration of the WGCleanup routine. All of our Charting Tools example programs use WGCleanup without any special declarations. All of our Real-Time Graphics Tools use WRCleanup without any special declarations.

Why does your program require special declarations ?

If your program is strictly a Charting Tools program it MUST include as part of the project the VBGlobal.BAS and WGGlobal.BAS modules. See the Easygraf example. The VBGlobal.BAS module contains the WGCleanup declaration.


If your program is a Real-Time Tools program it MUST include as part of the project the WRGlobal.BAS and WGGlobal.BAS modules. See the ScrollG1 example program. The WRGlobal.BAS module contains the WRCleanup declaration.

You cannot call the WGCleanup function if you are including WRGlobal.BAS in your program.

Go to Top of Page

senkyoshi

6 Posts

Posted - 11 Oct 2005 :  11:51:34  Show Profile  Reply with Quote
Thank you. That explained a lot. I am new to Quinn-Curtis functions and I am taking over someone else's project so I didnt understand some things. Thanks for your help.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07