Started by Danielm103 ·
2009-09-03 23:11 UTC ·
1 replies · SMF topic #902
Danielm103
2009-09-03 23:11 UTC
Hi Owen
something you might want to be aware of. Bricscad does not automatically free the resbuf returned by acedGetArgs as AutoCAD does, you must explicitly call acutRelRb. I have filed a bug report with Bricsys regarding this, but I don't think it has been fixed yet.
calling acutRelRb and setting the pointer to NULL seems to make both platforms happy.
owenwengerd
2009-09-04 01:22 UTC
Thanks for the heads up. Since acutRelRb() on the returned list is a no-op in AutoCAD, an easy solution would be to call acutRelRb on both platforms (except that for OpenDCL that would mean adding acutRelRb in 446 places). I just did a quick test, and the more serious problem is that in Bricscad every call to acedGetArgs returns a new copy of the argument resbuf. This causes the OpenDCL argument processing algorithm to fail because it calls acedGetArgs a second time to get back to the head of the list for calculating which argument triggered the argument processing exception. All this because Autodesk forgot to type the returned resbuf* as const in the R13 header file.
Hopefully Bricsys fixes their implementation to match AutoCAD's, then I won't need to worry about it.