Skip to content

Commit

Permalink
d3dretrace: Fix image leaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfonseca committed Mar 26, 2015
1 parent 284e001 commit 63b9e44
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions retrace/d3d7state_images.cpp
Expand Up @@ -187,6 +187,7 @@ dumpFramebuffer(JSONWriter &json, IDirect3DDevice7 *pDevice)
json.beginMember("RENDER_TARGET_0");
json.writeImage(image);
json.endMember(); // RENDER_TARGET_*
delete image;
}

// Search for a depth-stencil attachment
Expand All @@ -202,6 +203,7 @@ dumpFramebuffer(JSONWriter &json, IDirect3DDevice7 *pDevice)
json.beginMember("DEPTH_STENCIL");
json.writeImage(image);
json.endMember(); // DEPTH_STENCIL
delete image;
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions retrace/d3d8state_images.cpp
Expand Up @@ -204,6 +204,7 @@ dumpTextures(JSONWriter &json, IDirect3DDevice8 *pDevice)
json.beginMember(label);
json.writeImage(image);
json.endMember(); // PS_RESOURCE_*
delete image;
}
}
}
Expand Down Expand Up @@ -231,6 +232,7 @@ dumpFramebuffer(JSONWriter &json, IDirect3DDevice8 *pDevice)
json.beginMember("RENDER_TARGET_0");
json.writeImage(image);
json.endMember(); // RENDER_TARGET_*
delete image;
}
}

Expand All @@ -243,6 +245,7 @@ dumpFramebuffer(JSONWriter &json, IDirect3DDevice8 *pDevice)
json.beginMember("DEPTH_STENCIL");
json.writeImage(image);
json.endMember(); // RENDER_TARGET_*
delete image;
}
}

Expand Down
3 changes: 3 additions & 0 deletions retrace/d3d9state_images.cpp
Expand Up @@ -197,6 +197,7 @@ dumpTextures(JSONWriter &json, IDirect3DDevice9 *pDevice)
json.beginMember(label);
json.writeImage(image);
json.endMember(); // PS_RESOURCE_*
delete image;
}
}
}
Expand Down Expand Up @@ -237,6 +238,7 @@ dumpFramebuffer(JSONWriter &json, IDirect3DDevice9 *pDevice)
json.beginMember(label);
json.writeImage(image);
json.endMember(); // RENDER_TARGET_*
delete image;
}
}

Expand All @@ -249,6 +251,7 @@ dumpFramebuffer(JSONWriter &json, IDirect3DDevice9 *pDevice)
json.beginMember("DEPTH_STENCIL");
json.writeImage(image);
json.endMember(); // RENDER_TARGET_*
delete image;
}
}

Expand Down

0 comments on commit 63b9e44

Please sign in to comment.