schellingb / UnityCapture

Streams Unity rendered output to other Windows applications as virtual capture device

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Memory Leakage when repeating create and delete instance

hansuk-kim-wst opened this issue · comments

I am using UnityCaptureFilter for my project. There is a memory leakage when deleting sender instance if there is at least one receiver.
Adding UnmapViewOfFile in the destructor of SharedImageMemory solves it.

~SharedImageMemory()
{
	...
	if (m_pSharedBuf) UnmapViewOfFile(m_pSharedBuf);	// added. prevent memory leak.
}