OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "JBig2_SymbolDict.h" | 7 #include "JBig2_SymbolDict.h" |
8 CJBig2_SymbolDict::CJBig2_SymbolDict() | 8 CJBig2_SymbolDict::CJBig2_SymbolDict() |
9 { | 9 { |
10 SDNUMEXSYMS = 0; | 10 SDNUMEXSYMS = 0; |
(...skipping 23 matching lines...) Expand all Loading... |
34 dst->SDEXSYMS[i] = NULL; | 34 dst->SDEXSYMS[i] = NULL; |
35 } | 35 } |
36 } | 36 } |
37 return dst; | 37 return dst; |
38 } | 38 } |
39 | 39 |
40 CJBig2_SymbolDict::~CJBig2_SymbolDict() | 40 CJBig2_SymbolDict::~CJBig2_SymbolDict() |
41 { | 41 { |
42 if(SDEXSYMS) { | 42 if(SDEXSYMS) { |
43 for(FX_DWORD i = 0; i < SDNUMEXSYMS; i++) { | 43 for(FX_DWORD i = 0; i < SDNUMEXSYMS; i++) { |
44 if(SDEXSYMS[i]) { | 44 delete SDEXSYMS[i]; |
45 delete SDEXSYMS[i]; | |
46 } | |
47 } | 45 } |
48 m_pModule->JBig2_Free(SDEXSYMS); | 46 m_pModule->JBig2_Free(SDEXSYMS); |
49 } | 47 } |
50 if(m_bContextRetained) { | 48 if(m_bContextRetained) { |
51 if(m_gbContext) { | 49 if(m_gbContext) { |
52 m_pModule->JBig2_Free(m_gbContext); | 50 m_pModule->JBig2_Free(m_gbContext); |
53 } | 51 } |
54 if(m_grContext) { | 52 if(m_grContext) { |
55 m_pModule->JBig2_Free(m_grContext); | 53 m_pModule->JBig2_Free(m_grContext); |
56 } | 54 } |
57 } | 55 } |
58 } | 56 } |
OLD | NEW |