added warning comment about need to unref newly created gdd before

installing into smart pointer
This commit is contained in:
Jeff Hill
2009-08-31 23:21:37 +00:00
parent 955e9cd4d1
commit dfb29b258b

View File

@@ -20,6 +20,21 @@
#include "gdd.h"
#include "shareLib.h"
//
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// !! WARNING WARNING WARNING WARNING WARNING WARNING WARNING !!
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// // be careful to manually unreference here
// // (the reference count is initialized to one by the gdd ctor)
// Gdd * pDD0 = new gdd;
// smartGDDPointer pDD1 (pDD0);
// pDD0->unreference ();
//
// // from here on down the smart pointer maintains the ref count
// smartGDDPointer pDD2 = pDD1;
// smartGDDPointer pDD3 = pDD2;
// pDD2 = pDD3;
//
template < class T >
class smartGDDPointerTemplate {
public: