CpEpEngine.cpp
branchsync
changeset 315 215b74e73f78
parent 313 eec9885e1222
child 317 2b66fad455d4
     1.1 --- a/CpEpEngine.cpp	Mon Oct 22 23:13:52 2018 +0200
     1.2 +++ b/CpEpEngine.cpp	Mon Oct 22 23:21:28 2018 +0200
     1.3 @@ -1379,14 +1379,18 @@
     1.4  
     1.5      for (auto p = sync_callbacks.begin(); p != sync_callbacks.end(); ++p) {
     1.6          if (p->pdata->unmarshaled == this->client_callbacks) {
     1.7 +            if (p->pdata->marshaled)
     1.8 +                p->pdata->marshaled->Release();
     1.9 +            if (p->pdata->unmarshaled)
    1.10 +                p->pdata->unmarshaled->Release();
    1.11              delete p->pdata;
    1.12 -            sync_callbacks.erase(p);
    1.13 +            p->pdata = nullptr;
    1.14              break;
    1.15          }
    1.16      }
    1.17  
    1.18      this->client_callbacks->Release();
    1.19 -    this->client_callbacks = NULL;
    1.20 +    this->client_callbacks = nullptr;
    1.21  
    1.22      return S_OK;
    1.23  }