summaryrefslogtreecommitdiff
path: root/src/extras
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-12-29 20:30:57 +0100
committeraap <aap@papnet.eu>2020-12-29 20:30:57 +0100
commit14f7dbade88da108bf135aaeaaead9b14c654a14 (patch)
treef4cd6a350e04885473f7d7c6312c2ae897c96b4f /src/extras
parentd39c145f603deaa50c81e3fe42e2c02097c2137c (diff)
fix custom pipes mem leak
Diffstat (limited to 'src/extras')
-rw-r--r--src/extras/custompipes_d3d9.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/extras/custompipes_d3d9.cpp b/src/extras/custompipes_d3d9.cpp
index 27006c6a..e670fc93 100644
--- a/src/extras/custompipes_d3d9.cpp
+++ b/src/extras/custompipes_d3d9.cpp
@@ -171,6 +171,9 @@ DestroyVehiclePipe(void)
rw::d3d::destroyVertexShader(neoVehicle_VS);
neoVehicle_VS = nil;
+ rw::d3d::destroyPixelShader(neoVehicle_PS);
+ neoVehicle_PS = nil;
+
((rw::d3d9::ObjPipeline*)vehiclePipe)->destroy();
vehiclePipe = nil;
}
@@ -362,6 +365,12 @@ CreateGlossPipe(void)
void
DestroyGlossPipe(void)
{
+ rw::d3d::destroyVertexShader(neoGloss_VS);
+ neoGloss_VS = nil;
+
+ rw::d3d::destroyPixelShader(neoGloss_PS);
+ neoGloss_PS = nil;
+
((rw::d3d9::ObjPipeline*)glossPipe)->destroy();
glossPipe = nil;
}