Changeset 22700 in vbox for trunk/include/VBox/com
- Timestamp:
- Sep 2, 2009 10:05:23 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/com/ptr.h
r22305 r22700 67 67 #include <VBox/com/assert.h> 68 68 69 namespace com 70 { 71 #define LOGREF(pObj, cRefs) com::LogRef(#pObj "{%p}.refCnt=%d\n", (pObj), (cRefs)); 72 void LogRef(const char *pcszFormat, ...); 73 } 74 69 75 /** 70 76 * Strong referencing operators. Used as a second argument to ComPtr<>/ComObjPtr<>. … … 75 81 protected: 76 82 77 static void addref (C *p) { p->AddRef(); } 78 static void release (C *p) { p->Release(); } 83 static void addref(C *p) 84 { 85 size_t cRefs = p->AddRef(); 86 LOGREF(p, cRefs); 87 } 88 static void release(C *p) 89 { 90 p->Release(); 91 } 79 92 }; 80 93
Note:
See TracChangeset
for help on using the changeset viewer.