WrapperCache

JS side cache for wrapper objects.

This is mainly used for caching wrappers of Qt objects which are not directly created by our Nodejs application. The purpose of the cache is to keep "alive" wrapper objects and their underlying C++ wrappers which may be connected to Qt signals from the real Qt object. This makes it easier for application to grab one of these objects, set up event handlers, and then let the object go and not have the wrapper automatically and unexpectedly garbage collected.

Hierarchy

  • WrapperCache

Index

Constructors

Methods

Constructors

constructor

+ new WrapperCache(): WrapperCache

Returns: WrapperCache

Methods

get

getT›(wrapperConstructor: object, native: NativeElement): T

Type parameters:

T

Parameters:

wrapperConstructor: object

NameType
constructor

native: NativeElement

Returns: T