Destructor not firing on Mac App.Close event

Please see sample project:

Start the project and hit the close button of the window.

On Windows the Destructor or myClass is firing and the MsgBox is displayed.
On Mac this doesn’t happen.
Is this a bug or am I missing something?

If you add this to the Window1.Open() event:

if app.cls <> nil then msgbox "cls is not nil" else msgbox "cls is nil" end if

You will get a ‘CLS is not nil’ message.
Then, when you close the window, app.autoquit kicks in.
And the destructor message is seen.

It could be that the compiler understands that cls is never used, and optimises it out…

I get the destructor message even without the code above, in debug mode at least…

Well in real “myClass” is a class for loading and saving local settings (such as window positions).
This class is used very often in our projects but the Destructor doesn’t get fired on App.Close.