More valgrinding and fixing a serious mem leak - Alex
[terminatorX.git] / src / tX_audiofile.cc
index 8372aa713eea257a436b89a63211a7097279ac65..cbd6172c3a78434fd482167c48c1227a7ccc8198 100644 (file)
@@ -162,19 +162,8 @@ tX_audio_error tx_audiofile :: load(char *p_file_name)
 }
 
 tx_audiofile :: ~tx_audiofile() {
-       switch (mem_type) {
-               case TX_AUDIO_MMAP: break;
-               case TX_AUDIO_LOAD: {
-                       free(mem);
-                       break;
-               }
-               case TX_AUDIO_UNDEFINED: break;
-       }       
-
-       if (file) {
-               if (mem_type==TX_AUDIO_MMAP) {
-                       // free mmap
-               }
+       if (mem) {
+               free(mem);
        }
  }