From 85993d02ad94b60d784e9708d3a5a9a527de01e5 Mon Sep 17 00:00:00 2001 From: "fires.gc" Date: Wed, 17 Sep 2008 06:50:52 +0000 Subject: [PATCH] fixed small memory leaks of the windows version git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@549 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/MemoryUtil.cpp | 2 +- Source/Core/Common/Src/Thread.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Common/Src/MemoryUtil.cpp b/Source/Core/Common/Src/MemoryUtil.cpp index 39e550452e..23f8457dec 100644 --- a/Source/Core/Common/Src/MemoryUtil.cpp +++ b/Source/Core/Common/Src/MemoryUtil.cpp @@ -102,7 +102,7 @@ void* AllocateMemoryPages(int size) void FreeMemoryPages(void* ptr, int size) { #ifdef _WIN32 - VirtualFree(ptr, size, MEM_RELEASE); + VirtualFree(ptr, 0, MEM_RELEASE); #else munmap(ptr, size); #endif diff --git a/Source/Core/Common/Src/Thread.cpp b/Source/Core/Common/Src/Thread.cpp index 61c2f13c5e..18f0763b51 100644 --- a/Source/Core/Common/Src/Thread.cpp +++ b/Source/Core/Common/Src/Thread.cpp @@ -46,7 +46,7 @@ CriticalSection::CriticalSection(int spincount) CriticalSection::~CriticalSection() { - // No need to do anything + DeleteCriticalSection(§ion); }