Skip to content

Commit 57747bf

Browse files
committed
Add WebViewDestroy class for usage in std::shared_ptr/unique_ptr
Signed-off-by: falkTX <falktx@falktx.com>
1 parent 5424b73 commit 57747bf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

distrho/extra/WebViewImpl.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,12 @@ void webViewReload(WebViewHandle webview);
125125
void webViewResize(WebViewHandle webview, uint width, uint height, double scaleFactor);
126126

127127
// --------------------------------------------------------------------------------------------------------------------
128+
129+
/**
130+
Helper class for usage in std::shared_ptr and std::unique_ptr.
131+
*/
132+
struct WebViewDestroy {
133+
void operator()(WebViewHandle handle) { webViewDestroy(handle); }
134+
};
135+
136+
// --------------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)