public
Created

  • Download Gist
leak.c
C
1 2 3 4 5 6 7
int some_method() {
SOME_STRUCT* reallyBigObject = malloc(sizeof(SOME_STRUCT));
 
// FORGET TO DEREFERENCE reallyBigObject
return 42;
}
leak.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13
var trolls = (function () {
var reallyBigObject = eatMemory();
 
(function () {
var lulz = reallyBigObject;
})();
 
// FORGET TO DEREFERENCE reallyBigObject
 
return function () {
return 42;
};
})();

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.