dega512
07-07-2007, 04:43 PM
This is probably a silly question, but I can't seem to find the answer on Google or MSDN.
Here is my question:
Do I have to delete the pointer to the string given to me by ID3DXBaseEffect::GetString, or is it deleted when I release the effect?
i.e.
ID3DXEffect *pEffect = ...; // would be pointing to the loaded effect
D3DXHANDLE strHandle = ...; // would be pointing to the string parameter
LPCSTR strValue;
if (FAILED(pEffect->GetString(strHandle, &strValue)))
{
// handle the error
}
// do something with 'strValue'
delete strValue; // do I need this???
Here is my question:
Do I have to delete the pointer to the string given to me by ID3DXBaseEffect::GetString, or is it deleted when I release the effect?
i.e.
ID3DXEffect *pEffect = ...; // would be pointing to the loaded effect
D3DXHANDLE strHandle = ...; // would be pointing to the string parameter
LPCSTR strValue;
if (FAILED(pEffect->GetString(strHandle, &strValue)))
{
// handle the error
}
// do something with 'strValue'
delete strValue; // do I need this???