Actually delete persistence in destructor of websockets
This commit is contained in:
parent
927cbd1681
commit
5608cbe5ea
@ -20,7 +20,7 @@ void uWS_App_ws(const FunctionCallbackInfo<Value> &args) {
|
||||
UniquePersistent<Function> closePf;
|
||||
|
||||
struct PerSocketData {
|
||||
Persistent<Object> *socketPf;
|
||||
UniquePersistent<Object> *socketPf;
|
||||
};
|
||||
|
||||
/* 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 */
|
||||
PerSocketData *perSocketData = (PerSocketData *) ws->getUserData();
|
||||
perSocketData->socketPf = new Persistent<Object>;
|
||||
perSocketData->socketPf = new UniquePersistent<Object>;
|
||||
perSocketData->socketPf->Reset(isolate, wsObject);
|
||||
|
||||
Local<Function> openLf = Local<Function>::New(isolate, openPf);
|
||||
|
Loading…
Reference in New Issue
Block a user