diff --git a/CefSharp/ManagedCefRefPtr.h b/CefSharp/ManagedCefRefPtr.h index 2905bd1d9..8a6dcdf4d 100644 --- a/CefSharp/ManagedCefRefPtr.h +++ b/CefSharp/ManagedCefRefPtr.h @@ -96,6 +96,21 @@ public: swap(%r._ptr); } + virtual bool Equals(Object^ obj) override + { + if(obj->GetType() == GetType()) + { + MCefRefPtr^ other = safe_cast(obj); + return (*other)._ptr == _ptr; + } + return false; + } + + virtual int GetHashCode() override + { + return (int)_ptr; + } + private: T* _ptr; };