Introduction
GUI Runner of Gnoga Multi-connection application uses a derived Connection_Data_Type record. In it, some fields are pointers to objects dynamically allocated. For example, each connection requires a different Problem instance. On_Connection event, the Problem factory passed to the Gnoga Runner creates a new Problem object. The pointer is placed into the connection data, so that no user interaction with the Problem do not interfere with other user Problems.
When the connection is closed (either the TAB browser is closed of F5 is pressed in a TAB), the connection data is finalized, but there is no way to de-allocate the memory previously allocated by the Runner.
Initial experiment was done by making Connection_Data_Type in Gnoga.Types to be a new Ada.Finalization.Limited_Controlled type, but unsuccessfully. See this Gnoga branch and this Alice branch for more information.
DoD — The GUI Runner is able to de-allocate previously dynamic memory allocated for a Problem using the Problem factory.
Tasks
Introduction
GUI Runner of Gnoga Multi-connection application uses a derived
Connection_Data_Typerecord. In it, some fields are pointers to objects dynamically allocated. For example, each connection requires a different Problem instance.On_Connectionevent, the Problem factory passed to the Gnoga Runner creates a new Problem object. The pointer is placed into the connection data, so that no user interaction with the Problem do not interfere with other user Problems.When the connection is closed (either the TAB browser is closed of F5 is pressed in a TAB), the connection data is finalized, but there is no way to de-allocate the memory previously allocated by the Runner.
Initial experiment was done by making
Connection_Data_TypeinGnoga.Typesto be anew Ada.Finalization.Limited_Controlledtype, but unsuccessfully. See this Gnoga branch and this Alice branch for more information.Tasks
Connection_Data_Type