Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template <typename T> inline void SafeRelease(T *&pI, bool bDelete = false)
- {
- if (pI != NULL)
- {
- pI->Release();
- if(bDelete)
- delete pI; // not sure about this;
- pI = NULL;
- }
- }
- template <class T> inline void SafeRelease(T **ppT, bool bDelete = false)
- {
- if(*ppT != NULL)
- {
- (*ppT)->Release();
- if(bDelete)
- delete *ppT; // not sure about thus;
- *ppT = NULL;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement