File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,8 @@ namespace Php {
1717 */
1818void Base::__destruct () const
1919{
20- // throw exception, so that the PHP-CPP library will check if the user
21- // somehow registered an explicit __destruct method
22- throw NotImplemented ();
20+ // destroy the object by default
21+ zend_objects_destroy_object (_impl->php ());
2322}
2423
2524/* *
Original file line number Diff line number Diff line change @@ -1130,7 +1130,9 @@ void ClassImpl::destructObject(zend_object *object)
11301130 }
11311131 catch (const NotImplemented &exception)
11321132 {
1133- // fallback on the default destructor call
1133+ // fallback on the default destructor call in case a derived object
1134+ // of Base throws this. The default implementation will call this
1135+ // function in any case.
11341136 zend_objects_destroy_object (object);
11351137 }
11361138 catch (Throwable &throwable)
You can’t perform that action at this time.
0 commit comments