Clear protected value maps in RPCServer destructor
This commit is contained in:
parent
4fa35b7a12
commit
32219cf0a3
|
@ -190,6 +190,10 @@ RPCServer::RPCServer() {
|
||||||
}
|
}
|
||||||
|
|
||||||
RPCServer::~RPCServer() {
|
RPCServer::~RPCServer() {
|
||||||
|
// The protected values should be unprotected before releasing the context.
|
||||||
|
m_objects.clear();
|
||||||
|
m_callbacks.clear();
|
||||||
|
|
||||||
get_rpc_server(m_context) = nullptr;
|
get_rpc_server(m_context) = nullptr;
|
||||||
JSGlobalContextRelease(m_context);
|
JSGlobalContextRelease(m_context);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue