Aleric is right. This makes no sense. Don't bring this from v2, cuz it's wrong.
This commit is contained in:
@@ -179,10 +179,12 @@ public:
|
||||
void freeBuffer() { delete [] mBufferp; mBufferp = mCurBufferp = NULL; mBufferSize = 0; mWriteEnabled = FALSE; }
|
||||
void assignBuffer(U8 *bufferp, S32 size)
|
||||
{
|
||||
if(mBufferp && mBufferp != bufferp)
|
||||
//No no no no no! This breaks the paradigm of callers handling buffer allocation/deallocation
|
||||
//Also, buffers can be on stack! Calling delete[] on such a buffer would be VERY bad.
|
||||
/*if(mBufferp && mBufferp != bufferp)
|
||||
{
|
||||
freeBuffer() ;
|
||||
}
|
||||
}*/
|
||||
mBufferp = bufferp;
|
||||
mCurBufferp = bufferp;
|
||||
mBufferSize = size;
|
||||
|
||||
Reference in New Issue
Block a user