Hi all,
a newbie question,
sorry for my english.

I'm testing a small application to understand the messages
memory management:

http://manual.qooxdoo.org/current/pages/development/memory_management.html
http://qooxdoo.org/docs/general/snippets#support_for_finding_potential_memory_leaks

"dispose method to use: Every" Missing destruct ... "line

In my config.json file I added the source-task disposerDebug.

"source-disposerDebug" :
    {
"desc" : "source version with 'qx.disposerDebugLevel' for destruct support",

"extend" : [ "source" ],

"environment" :
{
"qx.disposerDebugLevel" : "1"
}
    },

I launch the job "./generate.py source-disposerDebug"

I navigate to the URL of the source "http://myserver/myapp/source/index.html
"
and run the command "qx.core.ObjectRegistry.shutdown();"
in the javascript console of firefox ( firebug 1.12.6 )

The console only shows me a line with the total of items released:
>>> qx.core.ObjectRegistry.shutdown()
016957 qx.core.ObjectRegistry: Disposed 86 objects

I expected to see something like, one line for object that i forget to
dispose:
"Missing destruct definition for: __list"
"Missing destruct definition for: __stack
...

How I can see the log in more detail and find the objects that remain
release in the destructor ?
 There are my javascript files:
Application.js
---------------
qx.Class.define("myapp.Application",
{
  extend : qx.application.Standalone,
  members :
  {
    __WindowManage : null,
    main : function()
    {
  this.base(arguments);

      if (qx.core.Environment.get("qx.debug"))
      {
        qx.log.appender.Native;
        qx.log.appender.Console;
  }

      var button5 = new qx.ui.form.Button("ManageWindow create",
"myapp/test.png");
      var button6 = new qx.ui.form.Button("ManageWindow destroy",
"myapp/test.png");
      var doc = this.getRoot();
      doc.add(button5, {left: 100, top: 130});
      doc.add(button6, {left: 100, top: 160});

      button5.addListener("execute", function(e) {
    if ( this.__WindowManage == null ) {
this.__WindowManage = new myapp.ManageWindow();
}
        this.__WindowManage.center();
        this.__WindowManage.open();
this.warn("ManageWindow create it");
      }, this);

      button6.addListener("execute", function(e) {
    if ( this.__WindowManage != null ) {
  this.__WindowManage.destroy();
  this.__WindowManage = null;
  this.warn("ManageWindow destroy");
} else {
  this.warn("button6 execute __WindowManage is null");
        }
      }, this);
  // After execute button 6, execute "qx.core.ObjectRegistry.shutdown()" in
javascript console
    }
  }
});

ManageWindow.js
---------------
qx.Class.define("myapp.ManageWindow",
{
  extend : qx.ui.window.Window,
  construct : function()
  {
    this.warn("myapp.ManageWindow construct begin");
    this.base(arguments, "Manage Window");
    this.set(
    {
      modal         : false,
      showMinimize  : false,
      showMaximize  : false,
      allowMaximize : false
    });
 this.cdata = new qx.data.Array();
this.cdata.push( { "A1" : "a1" } );
this.cdata.push( { "A2" : "a2" } );
this.cdata.push( { "A3" : "a3" } );
this.cdata.push( { "A4" : "a4" } );
this.cdata.push( { "A5" : "a5" } );
    // set the layout
    var layout = new qx.ui.layout.VBox();
    layout.setSeparator("separator-vertical");
    this._setLayout(layout);

    // Create the header of the list
    var listHeader = new qx.ui.basic.Label(this.tr("Posts"));
    listHeader.setPadding(5);
    listHeader.setBackgroundColor("white");
    listHeader.setAllowGrowX(true);
    listHeader.setFont("bold");
    this._add(listHeader);

    // Create the stack for the list
    this.__stack = new qx.ui.container.Stack();
    this._add(this.__stack, {flex: 1});

    // create list view
    this.__list = new qx.ui.form.List();
    this.__list.setDecorator(null);
    this.__list.setSelectionMode("single");
    this.__list.setPadding(0);
    this.__list.setMargin(0);
    this.__stack.add(this.__list);

    this.warn("myapp.ManageWindow construct end");
  },
  members :
  {
  },

  destruct : function()
  {
    // // // // // //
    // // // // // // this._disposeObjects("__list", "__stack");
// // // // // //
  }


});


config.json
-----------
{
  "name"    : "myapp",

  "include" :
  [
    {
      "path" : "${QOOXDOO_PATH}/tool/data/config/application.json"
    }
  ],

  "export" :
  [
    "api",
    "api-data",
    "build",
    "clean",
    "distclean",
    "dependencies",
    "fix",
    "info",
    "inspector",
    "lint",
    "migration",
    "pretty",
    "profiling",
    "source",
    "source-all",
    "source-hybrid",
    "source-server",
    "source-server-reload",
    "source-httpd-config",
"source-disposerDebug",
// "source-script",
    "simulation-build",
    "simulation-run",
    "test",
    "test-source",
    "translation",
    "validate-config",
    "validate-manifest",
    "watch"
  ],

  "default-job" : "source-hybrid",

  "let" :
  {
    "APPLICATION"  : "myapp",
    "QOOXDOO_PATH" : "..",
    "QXTHEME"      : "myapp.theme.Theme",
    "API_EXCLUDE"  : ["qx.test.*", "${APPLICATION}.theme.*",
"${APPLICATION}.test.*", "${APPLICATION}.simulation.*"],
    "LOCALES"      : [ "es", "en" ],
    "CACHE"        : "${TMPDIR}/qx${QOOXDOO_VERSION}/cache",
    "ROOT"         : "."
  },

  "jobs" :
  {
    "myappparts":
    {
      "packages" :
      {
        "parts"  :
        {
          "boot"     :
  {
    "include" : [ "${QXTHEME}", "${APPLICATION}.Application" ]
  },
          "settings": {
    "include" : ["${APPLICATION}.view.desktop.PreferenceWindow"]
  }
        }
      }
},
    "source" :
    {
      "extend" : [ "myappparts" ]
    },
 "source-disposerDebug" :
    {
"desc" : "source version with 'qx.disposerDebugLevel' for destruct support",

"extend" : [ "source" ],

"environment" :
{
"qx.disposerDebugLevel" : "1"
}
    },

    "build" :
    {
      "extend" : [ "myappparts" ]
    }
  }
}




--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/How-to-view-the-log-file-of-the-memory-management-tp7585215.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to