small progress towards shared memory C-api and test.c.

This commit is contained in:
erwincoumans
2015-07-30 23:22:44 -07:00
parent 26531f3fbc
commit 19c5be5646
11 changed files with 346 additions and 256 deletions

View File

@@ -77,15 +77,20 @@ void* Win32SharedMemory::allocateSharedMemory(int key, int size, bool allowCre
}
void Win32SharedMemory::releaseSharedMemory(int key, int size)
{
if (m_internalData->m_buf)
{
UnmapViewOfFile(m_internalData->m_buf);
m_internalData->m_buf=0;
}
if (m_internalData->m_hMapFile)
{
CloseHandle(m_internalData->m_hMapFile);
m_internalData->m_hMapFile = 0;
}
}
Win32SharedMemoryServer::Win32SharedMemoryServer()