Memory Leak?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a macro that creates an SVG file for a DLP printer from an Inventor part.
I have asked a different question about this project before, related to converting splines to Beziers, and got a lot of help here for which I am grateful.
The macro does now work (though I am not 100% happy with converting splines to short line segments, and still hope to find a clevere solution).
However, it eats memory. I don't see any reason for this, and I have added Erase and =Nothing code to try to prevent this, but it still eats all 6GB eventually.
Attached is the .ivb file. If you wish to test it then at the moment it needs to be called from the Macro menu.
Click "start plane" then click a part face, set the slice thickness to 5um, and watch memory slowly disappear in the Windows Resource Monitor.
The main loop is in the ClsToolBarEvents class module in the "SliceIt" method, with calls out to the SVGFile Class.
I think I have over-done my garbage collection, as I think that most of the objects I create go out of scope automatically. It would be almost as useful to know which destructors are superflous as to know where my missing destrector and memory leak is.
I am, of course, assuming that this is my fault. Is it possible that the memory leak is in AutoDesk code?