OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: kenkrupa on January 20, 2012, 01:38:54 PM

Title: Memory leak?
Post by: kenkrupa on January 20, 2012, 01:38:54 PM
Owen - My latest project (a modal dialog) starts out displaying fine, but if you open and close it dozens of times it start to get progressively more sluggish. So I'm wondering if there might be some memory leakage causing this. I haven't noticed this with other projects, but this one seemed to get "heavier" as I added more images - it now has 29 of them (small .png's, 2-5KB each), though only a few are displayed at a time. Is this a known issue.
Title: Re: Memory leak?
Post by: owenwengerd on January 20, 2012, 04:13:52 PM
Images definitely hog resources, but there is no known memory leak. If you can zip up a test project along with instructions, I'd like to take a look.
Title: Re: Memory leak?
Post by: kenkrupa on January 23, 2012, 11:53:31 AM
Hi Owen - what I'm finding is that the problem seems to be only when it's packed in a VLX. The attached zip has the .odcl file with a very stripped down .lsp to open it. When not reloading every time, there is no progressive delay. But there is when running from the VLX.  Just load the VLX and do WOODBEAMS, [Esc] to exit, and repeat. After a dozen times it starts to slow, after 20 it's quite noticeable.

The VLX contains the same .odcl file and lsp code as the two other files. The .odcl file should not be present on the search path when running the VLX, as the same code is used for either situation.

Any advice?

Title: Re: Memory leak?
Post by: owenwengerd on January 26, 2012, 01:04:18 PM
I've played around with your file in AutoCAD 2011 on Windows 7 64-bit w/ 32 GB of memory, and I can't really see any slowdown. It takes consistently about 4.5 seconds to display, even after 30 tries. I'll test on a virtual machine with more limited resources. In the meantime, it might be helpful to get specifics about the system you're noticing the slowdown on.
Title: Re: Memory leak?
Post by: Fred Tomke on January 27, 2012, 04:27:31 AM
Hi, I couldn't reproduce it either. But maybe it depends on the number of control accesses. Using only you lisp nothing happens to the controls.

Regards, Fred