555 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 - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...