{"head":"c616fd2fda6a9694d5ac383c5a5e632a5739b9d7","size":1,"push_id":46521965,"ref":"refs/heads/hash-key-leak","commits":[{"sha":"c616fd2fda6a9694d5ac383c5a5e632a5739b9d7","author":{"name":"Pieter van de Bruggen","email":"997908ac4a0d2f2db366306af7a4a62f60b10d7a@gmail.com"},"url":"https://api.github.com/repos/pvande/batman/commits/c616fd2fda6a9694d5ac383c5a5e632a5739b9d7","message":"Fix a leak where unknown hash lookups hold refs.\n\nBoth the EventEmitter and Observable mixins have an optimizing\nbehavior where the `event`/`property` method they add autocreates\nnew Events/Properties on failed lookups.  This is all well and\ngood, but both the Event and Property classes have a bad habit\nof traversing the ancestry and calling `event`/`property` on\neach ancestor.\n\nWhen the key in question is a complex object, this has the\nunfortunate side-effect of holding references to objects that\nshould be freed: a memory leak.\n\nFor reasons I can't quite understand yet, every instance of every\nmodel class I loaded was being looked up as a Property key, which\ndespite not being particularly sensible was still effective at\nplacing a reference to the object on the BatmanObject class and\nleaking memory.\n\nThis change does nothing to alter the behavior of `event`/\n`property`, instead providing a mechanism for querying for the\nexistence of events / properties and employing it internal to the\nEvent and Property classes."}],"legacy":{"head":"c616fd2fda6a9694d5ac383c5a5e632a5739b9d7","size":1,"push_id":46521965,"shas":[["c616fd2fda6a9694d5ac383c5a5e632a5739b9d7","pvande@gmail.com","Fix a leak where unknown hash lookups hold refs.\n\nBoth the EventEmitter and Observable mixins have an optimizing\nbehavior where the `event`/`property` method they add autocreates\nnew Events/Properties on failed lookups.  This is all well and\ngood, but both the Event and Property classes have a bad habit\nof traversing the ancestry and calling `event`/`property` on\neach ancestor.\n\nWhen the key in question is a complex object, this has the\nunfortunate side-effect of holding references to objects that\nshould be freed: a memory leak.\n\nFor reasons I can't quite understand yet, every instance of every\nmodel class I loaded was being looked up as a Property key, which\ndespite not being particularly sensible was still effective at\nplacing a reference to the object on the BatmanObject class and\nleaking memory.\n\nThis change does nothing to alter the behavior of `event`/\n`property`, instead providing a mechanism for querying for the\nexistence of events / properties and employing it internal to the\nEvent and Property classes.","Pieter van de Bruggen"]],"ref":"refs/heads/hash-key-leak"}}