I try to reserve the memory in this way:
I don't know why but any memory isn't released. Please! a bit of light in this matter!!
Thank you for your time.
- 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)