PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

A apparently simple problem

I try to reserve the memory in this way:

Code:

HRESULT CMyApplication::CreateVidMemSurfaces(CGapiSurface* pBackBuffer, HINSTANCE hInstance)
{
pBackBuffer->SetClipper(NULL);
GlobalMemoryStatus(&ms);
cout<<"memory: "<<ms.dwAvailPhys<<endl;

CGapiSurface* image = new CGapiSurface(GetGlobal());
imagen->CreateSurface(0,_T(".\\IMAGENES\\IMA_GRA\\g_1_1.jpg"));
GlobalMemoryStatus(&ms);
cout<<"Memory: "<<ms.dwAvailPhys<<endl;

imagen->ReleaseBuffer();
imagen->FreeSurface();
delete imagen;
GlobalMemoryStatus(&ms);
cout<<"Memory: "<<ms.dwAvailPhys<<endl;
}


I don't know why but any memory isn't released. Please! a bit of light in this matter!!

Thank you for your time.
Attachments:
g_1_1.rar (51 KB)
Hello,

I have contacted you with email, I think the issue is related to that the Windows Mobile imaging API caches the image resource. Let's continue the discussion in our email thread.

Sincerely
Johan
I am also interested in this information. Will you post the conclusion here? Or can I join your email thread?
I'll keep you in loop, we are on Skype now so it's easier for me to post something here later.