Skip to content

purgeProperties

Mike Byrne edited this page Mar 7, 2018 · 2 revisions

purgeProperties

description

Removes all properties from an object, useful in cleaning up when destroying a method

requires

  • nothing

parameters

  • none

returns

  • nothing

example usage:

this.destroy = function() {
  // remove specific event handlers
  container.removeEventListener('click', _handleClicks);

  // remove properties of this behavior
  purgeProperties(this);
};

Clone this wiki locally