Skip to content
Browse files

Merge pull request #23 from png85/wz4.leakfix

wz4 memory-related fixes
  • Loading branch information...
2 parents 12a42ff + d788b16 commit 055c2cac1784cfe984e9c971f01c039feaca0f53 @rygorous rygorous committed Apr 28, 2012
View
2 altona_wz4/altona/examples/_graphics/screenmode/main.hpp
@@ -30,9 +30,9 @@ enum Lines
LINE_FSAA,
LINE_ASPECT,
LINE_RTSIZE,
- LINE_MAX,
LINE_OVERSIZE,
LINE_OVERFSAA,
+ LINE_MAX,
};
struct Resolution
View
2 altona_wz4/altona/examples/_test/basetest/main.cpp
@@ -1287,7 +1287,7 @@ void TestMemoryHeap()
CHECK(h1.GetUsed()==0);
}
- delete mem;
+ delete [] mem;
}
View
1 altona_wz4/altona/main/ogg/stb_vorbis.h
@@ -2378,7 +2378,6 @@ void dct_iv_slow(float *buffer, int n)
//acc += x[j] * cos(M_PI / n * (i + 0.5) * (j + 0.5));
buffer[i] = acc;
}
- free(x);
}
void inverse_mdct_slow(float *buffer, int n, vorb *f, int blocktype)
View
1 altona_wz4/altona/main/util/bitio.cpp
@@ -520,6 +520,7 @@ sBool sFastHuffmanDecoder::Init(const sInt *lens,sInt count)
if(code && code-1 >= (1u<<i)) // er, these lengths don't seem to work
{
delete[] CodeMap;
+ delete[] codes;
return sFALSE;
}
View
5 altona_wz4/wz4/wz4frlib/wz3_bitmap_code.cpp
@@ -1632,11 +1632,12 @@ void GenBitmap::Blur(sInt flags,sF32 sx,sF32 sy,sF32 _amp)
// prepare
- pp = (sU16 *)Data;
- qq = (sU16 *) new sU64[Size];
order = flags & 15;
if(order==0) return;
+ pp = (sU16 *)Data;
+ qq = (sU16 *) new sU64[Size];
+
// blur x
size = sInt(128*sx*XSize);

0 comments on commit 055c2ca

Please sign in to comment.
Something went wrong with that request. Please try again.