﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1482	static Rom g_Rom is not free	spartazhc		"source/Lib/CommonLib/DepQuant.cpp:338   static Rom g_Rom;
There is no free for static Rom g_Rom, which will cause segment fault if I write an another encoderApp and encode some video multiple times.
I haven't read the context, but uninitiate it manually could fix it.

{{{
diff --git a/source/Lib/CommonLib/DepQuant.cpp b/source/Lib/CommonLib/DepQuant.cpp
index 2e914d0b..6e625b15 100644
--- a/source/Lib/CommonLib/DepQuant.cpp
+++ b/source/Lib/CommonLib/DepQuant.cpp
@@ -132,6 +132,7 @@ namespace DQIntern
     Rom() : m_scansInitialized(false) {}
     ~Rom() { xUninitScanArrays(); }
     void                init        ()                       { xInitScanArrays(); }
+    void                uninit      ()                       { xUninitScanArrays(); }
     const NbInfoSbb*    getNbInfoSbb( int hd, int vd ) const { return m_scanId2NbInfoSbbArray[hd][vd]; }
     const NbInfoOut*    getNbInfoOut( int hd, int vd ) const { return m_scanId2NbInfoOutArray[hd][vd]; }
     const TUParameters* getTUPars   ( const CompArea& area, const ComponentID compID ) const
@@ -1590,6 +1591,7 @@ DepQuant::DepQuant( const Quant* other, bool enc ) : QuantRDOQ( other )
 
 DepQuant::~DepQuant()
 {
+  DQIntern::g_Rom.uninit();
   delete static_cast<DQIntern::DepQuant*>(p);
 }
}}}"	defect	new	minor		VTM	VTM-12.0			spartazhc@… ksuehring XiangLi fbossen jvet@…
