delete -> delete[]

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12918 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2005-06-01 08:55:39 +00:00
parent e7b980ae96
commit f39e1df2de
+4 -2
View File
@@ -87,6 +87,8 @@ ServerBitmap::ServerBitmap(const ServerBitmap* bmp)
*/ */
ServerBitmap::~ServerBitmap() ServerBitmap::~ServerBitmap()
{ {
// TODO: Maybe it would be wiser to free the buffer here,
// instead of do that in every subclass ?
} }
/*! /*!
@@ -100,7 +102,7 @@ ServerBitmap::_AllocateBuffer(void)
{ {
uint32 length = BitsLength(); uint32 length = BitsLength();
if (length > 0) { if (length > 0) {
delete fBuffer; delete[] fBuffer;
fBuffer = new uint8[length]; fBuffer = new uint8[length];
} }
} }
@@ -113,7 +115,7 @@ ServerBitmap::_AllocateBuffer(void)
void void
ServerBitmap::_FreeBuffer(void) ServerBitmap::_FreeBuffer(void)
{ {
delete fBuffer; delete[] fBuffer;
fBuffer = NULL; fBuffer = NULL;
} }