Skip to content

Add a ton more Autorelease Pools#95

Closed
IsaacMarovitz wants to merge 1 commit into
renderbag:mainfrom
IsaacMarovitz:kitchen-sink
Closed

Add a ton more Autorelease Pools#95
IsaacMarovitz wants to merge 1 commit into
renderbag:mainfrom
IsaacMarovitz:kitchen-sink

Conversation

@IsaacMarovitz
Copy link
Copy Markdown
Contributor

@IsaacMarovitz IsaacMarovitz commented May 19, 2026

Should resolve or at least make the leaks much slower.

Comment thread plume_metal.cpp Outdated
Comment thread plume_metal.cpp Outdated
Comment thread plume_metal.cpp Outdated
Comment thread plume_metal.cpp Outdated
Comment thread plume_metal.cpp Outdated
Comment thread plume_metal.cpp Outdated
Comment thread plume_metal.cpp Outdated
Comment thread plume_metal.cpp Outdated
Comment thread plume_metal.cpp Outdated
Comment thread plume_metal.cpp Outdated
@IsaacMarovitz IsaacMarovitz force-pushed the kitchen-sink branch 2 times, most recently from 73214c1 to bd3bc78 Compare May 19, 2026 21:59
Comment thread plume_metal.cpp
@@ -1198,6 +1212,7 @@ namespace plume {
this->texture = buffer->mtl->newTexture(descriptor, 0, bytesPerRow);

descriptor->release();
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.

I'm not 100% sure but this might not need to be released since textureBufferDescriptor is not alloc/new/copy?

Comment thread plume_metal.cpp
NS::AutoreleasePool *releasePool = NS::AutoreleasePool::alloc()->init();

this->format = format;
this->functionName = (entryPointName != nullptr) ? NS::String::string(entryPointName, NS::UTF8StringEncoding) : MTLSTR("");
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.

This might need retain for the NS::String::string.

Comment thread plume_metal.cpp
if (debugName) {
debugName->release();
}
debugName = NS::String::string(name.c_str(), NS::UTF8StringEncoding);
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.

Same here, might need to retain this since we keep it.

@DarioSamo
Copy link
Copy Markdown
Contributor

Superseded by #97.

@DarioSamo DarioSamo closed this May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants