Resources aren't released correctly after rendering

Bug #111961 reported by Carl on 2007-05-03
4
Affects Status Importance Assigned to Milestone
Uiml.net
Status tracked in Uiml.net-dev
Uiml.net-dev
Medium
Jo Vermeulen

Bug Description

Beside the mentioned error in the summary, there is also a problem when rendering
multiple times in a row when using the layout management.
Something to do with a singleton in which the variables aren't cleared.

Possible solution for clearing the resources : use the garbagecollector
---------------------------------------------------------------------------------------
public class SWFRenderedInstance : Form, IRenderedInstance
{
 public delegate void CloseHandler();

 private CloseHandler m_closeH;
 public CloseHandler CloseH
 {
  get { return m_closeH; }
  set { m_closeH = value; }
 }

 public SWFRenderedInstance()
 {
  m_closeH = null;
 }

 public SWFRenderedInstance(string title)
 {
  Text = title;
  m_closeH = null;
 }

 public void ShowIt()
 {
  try
  {
   //Application.Run(this);
   this.Show();
  }
  catch(System.Exception e)
  {
   //Application thread is already running...
   this.ShowDialog(null);
  }
 }

 public void Add(Control c)
 {
  this.Controls.Add(c);
 }

 public string Title
 {
  get
  {
   return Text;
  }
  set
  {
   Text = value;
  }
 }

 protected override void OnClosed(System.EventArgs e)
 {
  GC.Collect();
  GC.WaitForPendingFinalizers();

  if(m_closeH != null)
   m_closeH();
  this.Dispose();
 }
}

Carl (carl-bruninx) wrote :
Jo Vermeulen (jozilla) wrote :

Added another bug for the problem with rendering after a document containing a layout element:

https://bugs.launchpad.net/uiml.net/+bug/112000

Jo Vermeulen (jozilla) wrote :

We need to check if this also occurs with the other vocabularies (GTK and CSWF).

Changed in uiml.net:
assignee: nobody → jozilla
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers