<blockquote>
<p>This has been fixed using static class instances, (because we need to deallocate, and releasing module will) and registration flag.</p>
<p>Francois</p>
</blockquote>
<h2 id="getting-rid-of-the-allocation">Getting rid of the allocation</h2>
<p>Another way of completely solving the issue is by getting rid of the <code>new</code> completely, which in turn means that there will not be a need for deallocation.</p>
<pre><code>--- a/modules/meta_engine/taglib.cpp
+++ b/modules/meta_engine/taglib.cpp
@@ -738,10 +738,16 @@ static int ReadMeta( vlc_object_t* p_this)
         return VLC_EGENERIC;
 
 #if TAGLIB_VERSION >= TAGLIB_SYNCDECODE_FIXED_VERSION
-    FileRef::addFileTypeResolver( new VLCTagLib::ExtResolver<MPEG::File>(".aac") );
+    static VLCTagLib::ExtResolver<MPEG::File>  ftr_acc (".aac");
+    static FileRef::FileTypeResolver const * p_ftr_acc = FileRef::addFileTypeResolver (&ftr_acc);
+
+    VLC_UNUSED(p_ftr_acc);
 #endif
 
-    FileRef::addFileTypeResolver( new VLCTagLib::ExtResolver<MP4::File>(".m4v") );
+    static VLCTagLib::ExtResolver<MP4::File>   ftr_m4v (".m4v");
+    static FileRef::FileTypeResolver const * p_ftr_m4v = FileRef::addFileTypeResolver (&ftr_m4v);
+
+    VLC_UNUSED(p_ftr_m4v);
 
 #if defined(_WIN32)
     wchar_t *wpath = ToWide( psz_path );</code></pre>
<h2 id="using-a-static-class-instance-for-such-registration">Using a static class instance for such registration</h2>
<p>It would of course be neater if such registration happens inside a static class instance, so if such is already available that path is probably a lot more pleasant to walk.</p>