Error memory Full....?
| Sat, 2008-05-03 08:30 | |
|
Hi. if ( nFile1 != -1 ) } SoundFile.Close(); CPlayerAdapter* CPlayerAdapter::NewL( CPlayerAdapter* self = NewLC( nFile1 ,nFile2, nFile3, aObserver); // ----------------------------------------------------------------------------- void CPlayerAdapter::ConstructL( const TInt nFile1, const TInt nFile2, const TInt nFile3 ) I delete ptrSoundBuf and ptr, and make NULL them in deConstructor. |
|






Forum posts: 586
Difficult to make sense of your code, not knowing which variables are local, which member variables, which global and what values they have. For example:
ptrSoundBuf1 = HBufC8::NewL( FileLen1 );How much memory are you trying to allocate here? You must know that most newest phones have at most tens of megabytes of free RAM to allocate? Optimistically, when no other apps are running. In older phones you have only 1-15 megabytes when no other apps are running.
Forum posts: 132
A TPtr and a TPtrC is not a C/C++ pointer - you should not allocate these on the heap.
And what about deleting all those other objects you create?