Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2107)

Unified Diff: core/src/fxcrt/fxcrt_windows.cpp

Issue 372473003: Remove custom memory manager (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Change malloc to calloc Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fxcrt/fxcrt_windows.h ('k') | core/src/fxcrt/mem_int.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxcrt/fxcrt_windows.cpp
diff --git a/core/src/fxcrt/fxcrt_windows.cpp b/core/src/fxcrt/fxcrt_windows.cpp
index 9b77b33ca27b2b24edb668b6c739c7a96752339d..6b0f0f290dff3d91c8ef2b431f2db08afcc453fe 100644
--- a/core/src/fxcrt/fxcrt_windows.cpp
+++ b/core/src/fxcrt/fxcrt_windows.cpp
@@ -1,7 +1,7 @@
// Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-
+
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../include/fxcrt/fx_ext.h"
@@ -23,13 +23,9 @@ FX_BOOL FX_File_Exist(FX_WSTR fileName)
}
return (dwAttri & FILE_ATTRIBUTE_DIRECTORY) == 0;
}
-IFXCRT_FileAccess* FXCRT_FileAccess_Create(IFX_Allocator* pAllocator)
+IFXCRT_FileAccess* FXCRT_FileAccess_Create()
{
- if (pAllocator) {
- return FX_NewAtAllocator(pAllocator) CFXCRT_FileAccess_Win64;
- } else {
- return FX_NEW CFXCRT_FileAccess_Win64;
- }
+ return FX_NEW CFXCRT_FileAccess_Win64;
}
void FXCRT_Windows_GetFileMode(FX_DWORD dwMode, FX_DWORD &dwAccess, FX_DWORD &dwShare, FX_DWORD &dwCreation)
{
@@ -92,13 +88,9 @@ void CFXCRT_FileAccess_Win64::Close()
::CloseHandle(m_hFile);
m_hFile = NULL;
}
-void CFXCRT_FileAccess_Win64::Release(IFX_Allocator* pAllocator)
+void CFXCRT_FileAccess_Win64::Release()
{
- if (pAllocator) {
- FX_DeleteAtAllocator(this, pAllocator, CFXCRT_FileAccess_Win64);
- } else {
- delete this;
- }
+ delete this;
}
FX_FILESIZE CFXCRT_FileAccess_Win64::GetSize() const
{
« no previous file with comments | « core/src/fxcrt/fxcrt_windows.h ('k') | core/src/fxcrt/mem_int.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698