From 14f7dbade88da108bf135aaeaaead9b14c654a14 Mon Sep 17 00:00:00 2001 From: aap Date: Tue, 29 Dec 2020 20:30:57 +0100 Subject: fix custom pipes mem leak --- src/extras/custompipes_d3d9.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/extras') 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; } -- cgit v1.2.3