Skip to content

Instantly share code, notes, and snippets.

Avatar

Dan Lee danielericlee

  • San Francisco, CA
View GitHub Profile
@danielericlee
danielericlee / gist:1263127
Created Oct 4, 2011
Simple Dojo Widget Leak Detection
View gist:1263127
// Query the registry
my_widgets = [];
dijit.registry.forEach(function(widget){
my_widgets.push(widget.id);
});
console.log("Widgets Captured (" + dijit.registry.length + ") in total)");
// Query it again, produce a Diff
var leakyWidgets = [];
dijit.registry.forEach(function(widget){