I would use a smart pointer for AcDbMText
Is it possible that a lot of this code was generated before smart pointers were available ??
[added]
. . . and the code base is probably used for multiple acad versions
[/added]
Would this be a case of "it's not broken so don't fix it" ?
or are there discernable advantages ?
Good questions
I don’t know when AcDbObjectPointer was added to ARX. I’m guessing that it’s been in forever.
If it’s not in ARX2000, it’s just a header…
AcDbObjectPointer<AcDbMText> pMtext (id, AcDb::kForRead);
This line tells the reader:
A, the pointer is guaranteed to be an object derived from AcDbMText.
B, that the object is guaranteed to be closed, even if there’s an exception.
Would this be a case of "it's not broken so don't fix it" ?
This is a newly created function, you’re in the code, might as well improve it
Of course, it’s not my project, just my opinion