release resources

This commit is contained in:
Samuliak 2024-07-07 12:34:04 +02:00
parent 3431f6d192
commit 23af64ade8
6 changed files with 44 additions and 19 deletions

View file

@ -18,7 +18,7 @@ public:
DepthStencilCache() = default;
~DepthStencilCache() {
clear();
reset();
}
void set(MTL::Device* dev) {
@ -70,7 +70,7 @@ public:
return depthStencilState;
}
void clear() {
void reset() {
for (auto& pair : depthStencilCache) {
pair.second->release();
}