[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/feed.php on line 173: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/feed.php on line 174: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
CAPE-OPEN Discussions about use and implementation of the CAPE-OPEN standard 2021-07-03T10:28:05+00:00 http://cape-open-forum.org/feed.php?f=66&t=729 2021-07-03T10:28:05+00:00 2021-07-03T10:28:05+00:00 http://cape-open-forum.org/viewtopic.php?t=729&p=2572#p2572 <![CDATA[Re: Call to release and primary object destructor]]>
So in your example the parameter collection contains a smart pointer to the parameter. So when the parameter collection ends to exists, the destructor of the smart pointer invokes delete on the parameter. The unit operaton in turn has a smart pointer that contains the reference to the parameter collection. So when the unit operation gets released by the PME it deletes itself, and with that the smart pointer gets destructed and deletes the parameter collection.

Same for the ports and the port collection: the ports are referenced by smart pointers in the port collection (and perhaps also by smart pointers in the unit operation), and the port collection is referenced by the smart pointer in the unit operation.

If you set a break point on the destructor of the parameter, parameter collection, port or port collection, you see the call stack when this happens.

Statistics: Posted by jasper — 03 July 2021, 10:28


]]>
2021-07-02T12:05:53+00:00 2021-07-02T12:05:53+00:00 http://cape-open-forum.org/viewtopic.php?t=729&p=2570#p2570 <![CDATA[Call to release and primary object destructor]]> Statistics: Posted by ahmedsabriz — 02 July 2021, 12:05


]]>