Understanding on Termination Connector of State Diagram in IBM Rhapsody

与世无争的帅哥 提交于 2019-12-24 02:13:05

问题


In IBM Rhapsody if i have created instance of a class using new, then Do we have to take care for deallocating memory by calling delete or Termination Connector will handle its destruction with memory deallocation in its State Diagram??


回答1:


If you are using C++ and the OXF (Object Execution Framework), then rather than calling delete, you should call destroy() on the object you want to delete.

Example:

C *c = new C();

// cleanup
c->destroy();

Note: Deleting an OMReactive object while the OXF is running is not a good idea. The OXF might try to dispatch an event to the object that does not exist anymoremore.



来源:https://stackoverflow.com/questions/26626872/understanding-on-termination-connector-of-state-diagram-in-ibm-rhapsody

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!