Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(938)

Unified Diff: xfa/fwl/core/cfwl_event.h

Issue 2509863002: Remove ref counting from CFWL_Event (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | xfa/fwl/core/ifwl_widget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/cfwl_event.h
diff --git a/xfa/fwl/core/cfwl_event.h b/xfa/fwl/core/cfwl_event.h
index e7bc15ad58a9b066d48fcb8495aa457d7e9dd748..a20abaa2a2637f4e1a31e55479a9b553b6e38773 100644
--- a/xfa/fwl/core/cfwl_event.h
+++ b/xfa/fwl/core/cfwl_event.h
@@ -78,17 +78,12 @@ class CFWL_Event {
virtual CFWL_EventType GetClassID() const;
- uint32_t Release();
-
IFWL_Widget* m_pSrcTarget;
IFWL_Widget* m_pDstTarget;
-
- private:
- uint32_t m_dwRefCount;
};
inline CFWL_Event::CFWL_Event()
- : m_pSrcTarget(nullptr), m_pDstTarget(nullptr), m_dwRefCount(1) {}
+ : m_pSrcTarget(nullptr), m_pDstTarget(nullptr) {}
inline CFWL_Event::~CFWL_Event() {}
@@ -96,14 +91,6 @@ inline CFWL_EventType CFWL_Event::GetClassID() const {
return CFWL_EventType::None;
}
-inline uint32_t CFWL_Event::Release() {
- m_dwRefCount--;
- uint32_t dwRefCount = m_dwRefCount;
- if (!m_dwRefCount)
- delete this;
- return dwRefCount;
-}
-
#define FWL_EVENT_DEF(classname, eventType, ...) \
class classname : public CFWL_Event { \
public: \
« no previous file with comments | « no previous file | xfa/fwl/core/ifwl_widget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698