Index: core/src/fxcodec/jbig2/JBig2_Segment.cpp |
diff --git a/core/src/fxcodec/jbig2/JBig2_Segment.cpp b/core/src/fxcodec/jbig2/JBig2_Segment.cpp |
index 39e4fafaa1fe30dcda7b4e481b38510683deda30..7ad55f3515d4b9f39f57b203c5a17fb6c43e023d 100644 |
--- a/core/src/fxcodec/jbig2/JBig2_Segment.cpp |
+++ b/core/src/fxcodec/jbig2/JBig2_Segment.cpp |
@@ -5,6 +5,9 @@ |
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
#include "JBig2_Segment.h" |
+ |
+#include "../../../include/fxcrt/fx_memory.h" |
+ |
CJBig2_Segment::CJBig2_Segment() { |
m_dwNumber = 0; |
m_cFlags.c = 0; |
@@ -19,28 +22,22 @@ CJBig2_Segment::CJBig2_Segment() { |
m_Result.vd = NULL; |
} |
CJBig2_Segment::~CJBig2_Segment() { |
- clean(); |
-} |
-void CJBig2_Segment::clean() { |
- if (m_pReferred_to_segment_numbers) { |
- m_pModule->JBig2_Free(m_pReferred_to_segment_numbers); |
- } |
- if (m_Result.vd) { |
- switch (m_nResultType) { |
- case JBIG2_IMAGE_POINTER: |
- delete m_Result.im; |
- break; |
- case JBIG2_SYMBOL_DICT_POINTER: |
- delete m_Result.sd; |
- break; |
- case JBIG2_PATTERN_DICT_POINTER: |
- delete m_Result.pd; |
- break; |
- case JBIG2_HUFFMAN_TABLE_POINTER: |
- delete m_Result.ht; |
- break; |
- default: |
- m_pModule->JBig2_Free(m_Result.vd); |
- } |
+ FX_Free(m_pReferred_to_segment_numbers); |
+ |
+ switch (m_nResultType) { |
+ case JBIG2_IMAGE_POINTER: |
+ delete m_Result.im; |
+ break; |
+ case JBIG2_SYMBOL_DICT_POINTER: |
+ delete m_Result.sd; |
+ break; |
+ case JBIG2_PATTERN_DICT_POINTER: |
+ delete m_Result.pd; |
+ break; |
+ case JBIG2_HUFFMAN_TABLE_POINTER: |
+ delete m_Result.ht; |
+ break; |
+ default: |
+ FX_Free(m_Result.vd); |
} |
} |