mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
unitest: Correct wrong free, initialize data.
Prevents valgrind warnings in unittest.
This commit is contained in:
parent
5200208a84
commit
2dbd9d8c70
2 changed files with 6 additions and 2 deletions
|
@ -50,6 +50,8 @@ static bool TestSamplerJit() {
|
|||
u8 **tptr = new u8 *[8];
|
||||
int *bufw = new int[8];
|
||||
u8 *clut = new u8[1024];
|
||||
memset(clut, 0, 1024);
|
||||
|
||||
for (int i = 0; i < 8; ++i) {
|
||||
tptr[i] = new u8[1024 * 1024 * 4];
|
||||
memset(tptr[i], 0, 1024 * 1024 * 4);
|
||||
|
@ -119,6 +121,8 @@ static bool TestPixelJit() {
|
|||
u16 *zb_data = new u16[512 * 2];
|
||||
fb.as32 = fb_data;
|
||||
depthbuf.as16 = zb_data;
|
||||
memset(fb_data, 0, sizeof(u32) * 512 * 2);
|
||||
memset(zb_data, 0, sizeof(u16) * 512 * 2);
|
||||
|
||||
for (int i = 0; i < count; ) {
|
||||
PixelFuncID id;
|
||||
|
|
|
@ -45,8 +45,8 @@ public:
|
|||
gstate_c.uv.vScale = 1.0f;
|
||||
}
|
||||
~VertexDecoderTestHarness() {
|
||||
delete src_;
|
||||
delete dst_;
|
||||
delete [] src_;
|
||||
delete [] dst_;
|
||||
delete cache_;
|
||||
delete dec_;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue