Update of /cvsroot/mahogany/M/src/classes
In directory sc8-pr-cvs1:/tmp/cvs-serv6036/src/classes
Modified Files:
MObject.cpp Profile.cpp
Log Message:
Template smart pointer
Index: MObject.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/MObject.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -b -u -2 -r1.23 -r1.24
--- MObject.cpp 18 Sep 2003 16:30:49 -0000 1.23
+++ MObject.cpp 3 Oct 2003 12:50:56 -0000 1.24
@@ -150,4 +150,21 @@
}
+// ----------------------------------------------------------------------------
+// Reference counting helpers
+// ----------------------------------------------------------------------------
+
+extern void RefCounterDecrement(MObjectRC *pointer)
+{
+ if( pointer )
+ pointer->DecRef();
+}
+
+extern void RefCounterAssign(MObjectRC *target,MObjectRC *source)
+{
+ if( target )
+ target->DecRef();
+ if( source )
+ source->IncRef();
+}
#endif //DEBUG
Index: Profile.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/Profile.cpp,v
retrieving revision 1.150
retrieving revision 1.151
diff -b -u -2 -r1.150 -r1.151
--- Profile.cpp 30 Sep 2003 13:46:19 -0000 1.150
+++ Profile.cpp 3 Oct 2003 12:50:57 -0000 1.151
@@ -37,4 +37,5 @@
#include "lists.h"
+#include "pointers.h"
#include "ConfigSource.h"
@@ -1083,4 +1084,6 @@
// Profile implementation
// ============================================================================
+
+DEFINE_REF_COUNTER(Profile)
// ----------------------------------------------------------------------------
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates