This is a something I was hoping for clarification on:  If I create an
object dynamically and add it to the DOM via create on a parent.  If I
later free that object manually and replace it with a newly created
version (still set to dynamic), does that cause any memory leaks?
Does the DOM remember every object I add to a parent or will freeing
it remove it completely from the DOM?

I was wanting to add some components that can be generated from
multiple points in an application but I didn't want to statically
allocate them for all possible combinations.  I would rather the
On_Click and other events generate the components as needed.  One
example might be a Dialog Box.  I may want it to have different
components on it based on error events or some On_Click event, but I
don't want to create one for every single error and on click ahead of
time.  I would rather just reuse the same Dialog reference and
recreate it as I need dynamically.  Would something like this cause
any problems (memory leak or otherwise)?

      declare
         use Gnoga.Gui.Plugin.jQueryUI.Widget;
         procedure Free is new
Ada.Unchecked_Deallocation(Dialog_Type,Dialog_Access);
      begin

         if(App.Dialog /= null) then
            Free(App.Dialog);
         end if;

         App.Dialog := new Gnoga.Gui.Plugin.jQueryUI.Widget.Dialog_Type;
         App.Dialog.Dynamic;

      end;

      App.Dialog.Create (Parent          => App.Console,
                         Title           => "About jDemo",
                         Content         => "Hello World!",
                         Height          => 300,
                         Width           => 300,
                         Position_My     => "top",
                         Position_At     => "center top+5%");

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Gnoga-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gnoga-list

Reply via email to