257 views
in GUI Development by

Hi,

If we try to remove the view using DismissDialog() or through Remove(view) , whether it will unload the view from the memory(RAM) or it will simply stop the rendering of the view?

Best Regards,

Preethi S,

Robert Bosch - India

1 Answer

0 votes
by
Hi Preethi,

first of all, as soon as you remove a GUI component from the screen (either by DismissDialog() or through Remove()), the GUI component will be no more rendered, because it is no more placed within the application or one of its embedded objects.

However, if the removed GUI component is no more accessible - because there is no variable referring to the GUI component - it will be removed from the memory (RAM) by the Garbage Collection.

This means, as long as you keep a variable that referes to a GUI component, it remains in the memory and you can Add() and Remove() it in order to show or hide it. As soon as there is no reference to a GUI component it will be deleted by the Garbage Collection.

This applies to all Chora objects - not only GUI components. It is the standard behaviour of the Garbage Collector: It takes care of the automatic detection and disposal of unused dynamically created objects. An object is considered as not used if there is absolutely no reference the application can use to access the object.

Best regards,

Manfred.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...