Page 1 of 1

Alternate of Visual::DisconnectFromView

Posted: 05 Jul 2020, 15:55
by decai
Hi, all

We use Visual::DisconnectFromView when we destroy a view. After upgraded, the DisconnectFromView become private, what's the alternate way to do so?
We use native c++ SDK of NoesisGUI.

Thanks.

Re: Alternate of Visual::DisconnectFromView

Posted: 06 Jul 2020, 18:08
by sfernandez
Why did you need to manually call DisconnectFromView? How were you using it?
The View already calls DisconnectFromView on the tree root when it gets destroyed, and all visuals in the tree are called to virtual function OnDisconnectFromView().

Re: Alternate of Visual::DisconnectFromView

Posted: 07 Jul 2020, 14:15
by decai
Then how to destroy a view? Or just there no reference the view will be destroyed?

Re: Alternate of Visual::DisconnectFromView

Posted: 07 Jul 2020, 14:23
by jsantos
Yes, Views are automatically destroyed when ref counter reach zero, as the rest of classes in Noesis.