Exactly,
If between the NewL and the delete doesn't have any leaving function, this would do:
Code:
FilBuff = HBufC8::NewL(MyEntry.iSize);
TPtr8 ReadPoint(FilBuff->Des());
fsSession.ReadFileSection(KHelloFileOut,0,ReadPoint,MyEntry.iSize);
delete FilBuff;
else, it's best to keep the habit of using the CleanupStack:
Code:
FilBuff = HBufC8::NewLC(MyEntry.iSize);
TPtr8 ReadPoint(FilBuff->Des());
fsSession.ReadFileSection(KHelloFileOut,0,ReadPoint,MyEntry.iSize);
CleanupStack::PopAndDestroy();//destroy the FillBuff that was pushed by NewLC