![]() |
【转帖】creator objects another one
creator objects another one
creator objects another one is correct this code? oddbblocktablerecordptr pstable = getmodelspaceid().safeopenobject(oddb::kforwrite); oddblineptr pent = new oddbline(); id= pstable->appendoddbentity(pent); i think so - but only if: oddblineptr pent = oddbline::createobject(); and oddblineptr pent = new oddbline(); are code equivalents, then it should be fine. i would recommend to use oddbline::creteobject() not "new oddbline". it's more safe. dd is responsible for disposing entities from database so let it create them. else problems may occur if dd and your application use different heaps. sergey slezkin |
所有的时间均为北京时间。 现在的时间是 05:11 PM. |