Thanks for your reply.

Originally Posted by
wizard_hu_
Why do you think that there is a leak?
My application exits with ALLOC: 260200ba, that seems to disappear if CWlanScanInfo is not created.
The full function looks like this
Code:
CDesC8Array* CWlanScanner::AccessPointMacArrayL()
{
const TInt KMaxNumberOfAccessPoints( 20 );
CDesC8Array* accessPoints =
new (ELeave) CDesC8ArrayFlat(KMaxNumberOfAccessPoints);
CleanupStack::PushL( accessPoints );
CWlanScanInfo* scanInfo=CWlanScanInfo::NewL();
CleanupStack::PushL( scanInfo );
CWlanMgmtClient* client=CWlanMgmtClient::NewL(); // <--- This leaves if WLAN is not supported
CleanupStack::PushL( client );
client->GetScanResults(*scanInfo);
[...] // Lines to handle scanInfo removed
CleanupStack::PopAndDestroy( client );
CleanupStack::PopAndDestroy( scanInfo );
CleanupStack::Pop( accessPoints );
return accessPoints;
}
// AccessPointMacArrayL function is called inside the trap
CDesC8Array* wlanArray = NULL;
TRAPD( err, wlanArray = AccessPointMacArrayL(); )
[..] // Handle error codes
if ( wlanArray )
{
wlanArray.Reset();
}
delete wlanArray;