CPUBackend: std::move shared_ptr where applicable

Very minor, just avoids churning reference count increments and decrements.
This commit is contained in:
Lioncache committed 2025-09-03 21:20:58 -04:00
1 parent 76e6c6f8ea
commit 4e83ca67f5
1 file changed
+2 -2
+2 -2
View File
@@ -317,7 +317,7 @@ namespace CPU {
// Resize the code buffer and reallocate our code size
CurrentCodeBuffer = CodeBuffers.StartLargerCodeBuffer();
RegisterForSignalHandler(PrevCodeBuffer);
RegisterForSignalHandler(std::move(PrevCodeBuffer));
return CurrentCodeBuffer.get();
}
@@ -326,7 +326,7 @@ namespace CPU {
// We have signal handlers that have generated code
// This means that we can not safely clear the code at this point in time
// Keep a reference to the old code buffer to delay deallocation
SignalHandlerCodeBuffers.push_back(CodeBuffer);
SignalHandlerCodeBuffers.push_back(std::move(CodeBuffer));
} else {
SignalHandlerCodeBuffers.clear();
}