Pressing the Produce Leak button will replace the current directive present in the above panel with a new directive of the same type. The memoryDirective implementation produces a memory leak based on the attributes passed.
Pressing the Create non leaking directive button will replace the directive with a new directive of the same type that cleans up registered event listeners after itself and thus does not leak memory.