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

Issue 2328403002: Fix some leaks associated with memory allocator (Closed)

Created:
4 years, 3 months ago by Wei Li
Modified:
4 years, 3 months ago
Reviewers:
Tom Sepez
CC:
pdfium-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
pdfium
Visibility:
Public.

Description

Fix some leaks associated with memory allocator Use CFX_DefStore to only replace CFX_FixedStore, but not CFX_StaticStore, since CFX_StaticStore has different behaviors. CFX_StaticStore doesn't require its users to explicitly call free(), it frees all the allocated memory during destruction. Use CFX_DefStore to replace CFX_StaticStore would cause leaks. Also remove two undeclared, but defined, functions. BUG=pdfium:242 Committed: https://pdfium.googlesource.com/pdfium/+/9de00fdc4d4e4dba9e754b337a05809482e4fea2

Patch Set 1 #

Total comments: 2

Patch Set 2 : address comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -38 lines) Patch
M xfa/fgas/crt/fgas_memory.cpp View 1 13 chunks +36 lines, -38 lines 0 comments Download

Messages

Total messages: 18 (10 generated)
Wei Li
pls review, thanks
4 years, 3 months ago (2016-09-12 18:08:30 UTC) #8
Tom Sepez
https://codereview.chromium.org/2328403002/diff/20001/xfa/fgas/crt/fgas_memory.cpp File xfa/fgas/crt/fgas_memory.cpp (right): https://codereview.chromium.org/2328403002/diff/20001/xfa/fgas/crt/fgas_memory.cpp#newcode10 xfa/fgas/crt/fgas_memory.cpp:10: #define MEMORY_TOOL_REPLACES_ALLOCATOR // Temporary, for CF testing. This line ...
4 years, 3 months ago (2016-09-12 18:18:05 UTC) #10
Tom Sepez
LGTM otherwise
4 years, 3 months ago (2016-09-12 18:18:22 UTC) #11
Wei Li
thanks, changed the comment https://codereview.chromium.org/2328403002/diff/20001/xfa/fgas/crt/fgas_memory.cpp File xfa/fgas/crt/fgas_memory.cpp (right): https://codereview.chromium.org/2328403002/diff/20001/xfa/fgas/crt/fgas_memory.cpp#newcode10 xfa/fgas/crt/fgas_memory.cpp:10: #define MEMORY_TOOL_REPLACES_ALLOCATOR // Temporary, for ...
4 years, 3 months ago (2016-09-12 21:39:21 UTC) #12
Tom Sepez
lgtm
4 years, 3 months ago (2016-09-12 21:40:04 UTC) #13
Tom Sepez
On 2016/09/12 21:40:04, Tom Sepez wrote: > lgtm (What I mean by "troubling" is that ...
4 years, 3 months ago (2016-09-12 21:40:42 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2328403002/40001
4 years, 3 months ago (2016-09-12 21:56:28 UTC) #16
commit-bot: I haz the power
4 years, 3 months ago (2016-09-12 22:15:23 UTC) #18
Message was sent while issue was closed.
Committed patchset #2 (id:40001) as
https://pdfium.googlesource.com/pdfium/+/9de00fdc4d4e4dba9e754b337a05809482e4...

Powered by Google App Engine
This is Rietveld 408576698