Admittedly this stems from my lack of deep understanding of closures. I found myself with a memory leak and am wondering if this bit of code has anything to do with it. There does not seem to be a destructor I can manually call in the documentation for these typed arrays:
myMethod: function() {
// Create a new array on the heap
var someData = new Uint8Array(32);
someData[0] = 1;
someData[1] = 2;
...
transferSomeData(someData.buffer, function(succeeded) {
// Dispose of the array
someData = []; // HOW TO DELETE?
});
}