Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion plume_metal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2238,7 +2238,9 @@ namespace plume {
}

MetalCommandList::~MetalCommandList() {
mtl->release();
if (mtl != nullptr) {
Comment thread
DarioSamo marked this conversation as resolved.
mtl->release();
}

for (auto& fenceSet : fences) {
for (auto* fence : fenceSet) {
Expand All @@ -2253,6 +2255,7 @@ namespace plume {
assert(mtl == nullptr);
startedEncoding = false;
mtl = queue->mtl->commandBufferWithUnretainedReferences();
mtl->retain();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a retain here is right but also needs an autorelease pool around this function.

mtl->setLabel(MTLSTR("RT64 Command List"));

// Reset fence waits and updates for new command list.
Expand Down