MCPcopy Create free account
hub / github.com/microsoft/SandDance / releasePooledEvent

Function releasePooledEvent

docs/external/js/react-dom.development.js:8706–8720  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

8704 }
8705
8706 function releasePooledEvent(event) {
8707 var EventConstructor = this;
8708
8709 if (!(event instanceof EventConstructor)) {
8710 {
8711 throw Error( "Trying to release an event instance into a pool of a different type." );
8712 }
8713 }
8714
8715 event.destructor();
8716
8717 if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) {
8718 EventConstructor.eventPool.push(event);
8719 }
8720 }
8721
8722 function addEventPoolingTo(EventConstructor) {
8723 EventConstructor.eventPool = [];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected