Solved! Go to Solution.
Solved by quigs. Go to Solution.
Hi all, A few weeks ago I asked the original question in this group about disposing of objects. Well, with a bit of research I found the answer myself. I was using the code straight out of Jerry Winters book to learn how to programme, probably like quiet a lot of you here, and I also used his jig examples. Well if you did use this material, then like me, if your still a n00b you may have ran into the same problems of disposal, or, you may not even be aware of what that is and wonder why you routine stalls for several seconds when you finish running your jig heavy routine in cad. To cut to the chase the very question I asked for help on is answered In the dev cast by Fenton Webb. The link is posted below, and you have to scroll down.
Cheers, and hope it helps some people. Martin.
Hey Martin
Getting the same issue but cannot locate the dev cast you refer to.. Can temm me which dev cast your refering to and maybe a direct link....
Many thanks!
Hi StormyC,
Basically, you need to dispose of objects like lines, arcs, circles, block
references & new Layers once you have finished with them:
For example: If you have a line:
Dim NewLine as line = new line(P1, P2)
At the end of you function dispose it like this:
NewLine.dispose()
That will stop your machine or routines from crashing.
As a rule, anything committed to the database, or that could be committed, even
lines and such you don’t actually use, need to be disposed of. I hope that’s clear.
And really sorry, but I checked my link I put in & it’s moved, hope that helps anyway.
Martin.
Thanks for the reply...
Sorted the problem now, I needed to dispose of the individual objects within a dbojectcollection ......