Actually delete persistence in destructor of websockets
This commit is contained in:
parent
927cbd1681
commit
5608cbe5ea
1 changed files with 2 additions and 2 deletions
|
@ -20,7 +20,7 @@ void uWS_App_ws(const FunctionCallbackInfo<Value> &args) {
|
||||||
UniquePersistent<Function> closePf;
|
UniquePersistent<Function> closePf;
|
||||||
|
|
||||||
struct PerSocketData {
|
struct PerSocketData {
|
||||||
Persistent<Object> *socketPf;
|
UniquePersistent<Object> *socketPf;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Get the behavior object */
|
/* Get the behavior object */
|
||||||
|
@ -60,7 +60,7 @@ void uWS_App_ws(const FunctionCallbackInfo<Value> &args) {
|
||||||
|
|
||||||
/* Attach a new V8 object with pointer to us, to us */
|
/* Attach a new V8 object with pointer to us, to us */
|
||||||
PerSocketData *perSocketData = (PerSocketData *) ws->getUserData();
|
PerSocketData *perSocketData = (PerSocketData *) ws->getUserData();
|
||||||
perSocketData->socketPf = new Persistent<Object>;
|
perSocketData->socketPf = new UniquePersistent<Object>;
|
||||||
perSocketData->socketPf->Reset(isolate, wsObject);
|
perSocketData->socketPf->Reset(isolate, wsObject);
|
||||||
|
|
||||||
Local<Function> openLf = Local<Function>::New(isolate, openPf);
|
Local<Function> openLf = Local<Function>::New(isolate, openPf);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue