Mercurial > hg > orthanc-stone
diff Framework/Viewport/WebAssemblyViewport.h @ 1328:fd616c4a5904 broker
Added mechanism to prevent callbacks from being sent on dead WebAssemblyViewport objects
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Fri, 27 Mar 2020 12:54:27 +0100 |
parents | cbfdba08e039 |
children | ab81ee8fce1f |
line wrap: on
line diff
--- a/Framework/Viewport/WebAssemblyViewport.h Wed Mar 25 14:34:27 2020 +0100 +++ b/Framework/Viewport/WebAssemblyViewport.h Fri Mar 27 12:54:27 2020 +0100 @@ -36,7 +36,9 @@ namespace OrthancStone { - class WebAssemblyViewport : public IViewport + class WebAssemblyViewport : public IViewport, + public boost::enable_shared_from_this<WebAssemblyViewport> + { private: class WasmLock; @@ -84,6 +86,9 @@ virtual ILock* Lock() ORTHANC_OVERRIDE; + /** + This method takes ownership + */ void AcquireInteractor(IViewportInteractor* interactor); const std::string& GetShortCanvasId() const