Added check for NULL pointer in HeapStorage policy.
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@618 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
5157e66c72
commit
f107dafa96
1 changed files with 8 additions and 2 deletions
|
@ -98,10 +98,13 @@ namespace Loki
|
|||
// Destroys the data stored
|
||||
// (Destruction might be taken over by the OwnershipPolicy)
|
||||
void Destroy()
|
||||
{
|
||||
if ( 0 != pointee_ )
|
||||
{
|
||||
pointee_->~T();
|
||||
::free( pointee_ );
|
||||
}
|
||||
}
|
||||
|
||||
// Default value to initialize the pointer
|
||||
static StoredType Default()
|
||||
|
@ -1517,6 +1520,9 @@ namespace std
|
|||
#endif // SMARTPTR_INC_
|
||||
|
||||
// $Log$
|
||||
// Revision 1.28 2006/03/27 18:38:30 rich_sposato
|
||||
// Added check for NULL pointer in HeapStorage policy.
|
||||
//
|
||||
// Revision 1.27 2006/03/27 18:34:36 rich_sposato
|
||||
// Added HeapStorage policy as mentioned in Feature Request 1441024.
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue