Hi Monika,
>  
> I am trying to reduce memory leaks in my application and also reduce 
> the use of memory in IE. I followed instructions on docs. However 
> after using functions like
> _disposeObjects and _disposeFields I am still receiving warnings about 
> missing destructs definitions.
Which documentation do you mean? This one: 
http://qooxdoo.org/documentation/0.8/memory_management
When do you call these functions? Normally these functions are called in 
the "destruct" section from your class definition.
> I would like also to ask about dispose method, when it should be used?
You should use the dispose methods for referenced types (arrays, maps, 
objects, etc) if you have a reference in you member section. Have a look 
to the code snipped. [1]
> My understanding of the above functions is:
> - use disposeObjects for qooxdoo labels, qooxdoo textfields, qooxdoo 
> tables (any qooxdoo widgets)
Yes, that's right. With this method you can dispose for example qooxdoo 
widgets, but you can also dispose "normal" qooxdoo objects.
> - use disposeFields for number, strings, arrays, objects (pure 
> JavaScript types)
Yes, but you can also delete a reference to a qooxdoo object. This is 
normally needed if a other instance has to dispose this object, than you 
only dispose the reference.
> - use disposeArray for arrays of qooxdoo objects.
Yes, that's right.

I hope I could answer your questions. If there is something unclear, 
pleas ask.

Cheers,
Chris

[1] <-- code snippet -->
qx.Class.define("testmem.Test",
{
  extend : qx.core.Object,

  construct : function(otherObject) {
    this.base(arguments);
   
    // This object should perhaps dispose the caller,
    // so use only disposeFields instead of , disposeObjects,
    // but this is use case specific.
    this.__otherObject = otherObject;

    // This object is created from this current constructor,
    // so use disposeObjects for this one.
    this.__myObject = new testmem.MyObject();

  members :
  {
    __myObject : null,
    __otherObject : null,  
  
   test : function() {
     // some code
   }
  },

  dispose : function() {
    this._disposeObjects("__myObject");
    this._disposeFields("__otherObject");
});


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to