Skip to content

Instantly share code, notes, and snippets.

View danielericlee's full-sized avatar

Dan Lee danielericlee

  • San Francisco, CA
View GitHub Profile
@danielericlee
danielericlee / gist:1263127
Created October 4, 2011 23:15
Simple Dojo Widget Leak Detection
// 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){