You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafodion.apache.org by "Zhu, Wen-Jun" <we...@esgyn.cn> on 2018/03/29 11:04:53 UTC
Is there a pattern about how to use ElemDDLColDef?
Hi all,
When I call CmpSeabaseDDL::buildColInfoArray(), I find that the pass-in parameter paramArray is broken after the call.
After some investigation, I find the destructor of class ElemDDLColDef deletes its member variable columnDataType_,
Which is passed in the constructor, and not owned by this class.
Usually, the resource is freed(or deleted) by the owner who allocated(or new) it, if . But the columnDataType_ in ElemDDLColDef
Is not owned by this class, so the destructor cannot delete it, right?
So I guess, is there a pattern on how to use ElemDDLColDef, and the classes using it? Or this is a bug?
Regards,
Wenjun Zhu