H. Verbeet : wined3d: Free the float constant map arrays for all stateblocks.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Aug 21 05:58:48 CDT 2006


Module: wine
Branch: master
Commit: efa5f785981bf90354bdea9ea3e4e1e6d81b876d
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=efa5f785981bf90354bdea9ea3e4e1e6d81b876d

Author: H. Verbeet <hverbeet at gmail.com>
Date:   Sat Aug 19 17:23:02 2006 +0200

wined3d: Free the float constant map arrays for all stateblocks.

---

 dlls/wined3d/stateblock.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 6242697..ea77ecd 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -254,14 +254,7 @@ static ULONG  WINAPI IWineD3DStateBlockI
             if (NULL != This->vertexDecl) {
                 IWineD3DVertexDeclaration_Release(This->vertexDecl);
             }
-            
-            HeapFree(GetProcessHeap(), 0, This->vertexShaderConstantF);
-            HeapFree(GetProcessHeap(), 0, This->set.vertexShaderConstantsF);
-            HeapFree(GetProcessHeap(), 0, This->changed.vertexShaderConstantsF);
-            HeapFree(GetProcessHeap(), 0, This->pixelShaderConstantF);
-            HeapFree(GetProcessHeap(), 0, This->set.pixelShaderConstantsF);
-            HeapFree(GetProcessHeap(), 0, This->changed.pixelShaderConstantsF);
- 
+
             /* NOTE: according to MSDN: The application is responsible for making sure the texture references are cleared down */
             for (counter = 0; counter < GL_LIMITS(sampler_stages); counter++) {
                 if (This->textures[counter]) {
@@ -273,6 +266,14 @@ static ULONG  WINAPI IWineD3DStateBlockI
             }
 
         }
+
+        HeapFree(GetProcessHeap(), 0, This->vertexShaderConstantF);
+        HeapFree(GetProcessHeap(), 0, This->set.vertexShaderConstantsF);
+        HeapFree(GetProcessHeap(), 0, This->changed.vertexShaderConstantsF);
+        HeapFree(GetProcessHeap(), 0, This->pixelShaderConstantF);
+        HeapFree(GetProcessHeap(), 0, This->set.pixelShaderConstantsF);
+        HeapFree(GetProcessHeap(), 0, This->changed.pixelShaderConstantsF);
+
         HeapFree(GetProcessHeap(), 0, This);
     }
     return refCount;




More information about the wine-cvs mailing list