ResultBuffer has a Finalizer that deletes the unmanaged resbuf chain when
Dispose() is called. If you don't call Dispose(), the finalizer still runs
when the garbage collector destroys the instance.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009
http://www.acadxtabs.com
Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");
wrote in message news:6214009@discussion.autodesk.com...
A am probably being paranoid/anal about this but I would like to know the
following from any of the experts out there:
Given that according to all documentation on the subject result buffers must
be diposed of explicitly after use as follows (VB.Net):
Dim rb as ResultBuffer = obj.Xdata
Dim rbArray as TypedValue() = rb.AsArray
..
..Use it somehow..
..
..
rb.Dispose()
Is there anything wrong with creating the result buffer and using it on the
fly? Such as as in:
Dim rbArray as TypedValue() = obj.XData.AsArray
Is the disposal handled inside of a wrapper somewhere?? Normally in
straight VB/C# I'm quite happy that there is no problem, but I don't want to
end up with some hard to find bugs/crashes relating to undisposed of result
buffers .