Skip to content

Commit

Permalink
- add cleanup after running client tests
Browse files Browse the repository at this point in the history
  • Loading branch information
polymonster committed Dec 2, 2024
1 parent fa19c0f commit 7647266
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,27 +101,27 @@
"preLaunchTask": "examples"
},
{
"name": "tests (Debug)",
"name": "raytraced_triangle (Debug)",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/target/debug/deps/tests-661041b177eb9ae4.exe",
"args": ["--test-threads=1", "--nocapture"],
"program": "${workspaceFolder}/target/debug/examples/raytraced_triangle.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"console": "externalTerminal",
"preLaunchTask": "examples"
},
{
"name": "raytraced_triangle (Debug)",
"name": "tests (Debug)",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/target/debug/examples/raytraced_triangle.exe",
"args": [],
"program": "${workspaceFolder}/target/debug/deps/tests-661041b177eb9ae4.exe",
"args": ["--test-threads=1", "--nocapture"],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"console": "externalTerminal",
"preLaunchTask": "examples"
},
]
}
7 changes: 7 additions & 0 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,13 @@ impl<D, A> Client<D, A> where D: gfx::Device, A: os::App, D::RenderPipeline: gfx
}
}

// cleanup heaps
self.pmfx.shader_heap.cleanup_dropped_resources(&self.swap_chain);
self.device.cleanup_dropped_resources(&self.swap_chain);

//
self.device.report_live_objects()?;

Ok(())
}
}

0 comments on commit 7647266

Please sign in to comment.