MCPcopy Create free account
hub / github.com/nodejs/nan / Ref

Method Ref

nan_object_wrap.h:92–96  ·  view source on GitHub ↗

Ref() marks the object as being attached to an event loop. * Refed objects will not be garbage collected, even if * all references are lost. */

Source from the content-addressed store, hash-verified

90 * all references are lost.
91 */
92 virtual void Ref() {
93 assert(!persistent().IsEmpty());
94 persistent().ClearWeak();
95 refs_++;
96 }
97
98 /* Unref() marks an object as detached from the event loop. This is its
99 * default state. When an object with a "weak" reference changes from

Callers

nothing calls this directly

Calls 2

ClearWeakMethod · 0.80
IsEmptyMethod · 0.45

Tested by

no test coverage detected