Fix a memory leak in the debugger session where memory was never released after session due to cyclic references in ModelVariableNode.

Fix an incorrect std::move in `DebuggerClientDap::variables` which could have caused incorrect states.
Fix invalid memory access in `LSPDocumentClient::requestSemanticHighlighting`.
This commit is contained in:
Martín Lucas Golini
2025-08-10 17:34:32 -03:00
parent 4da71def34
commit a1959fd149
7 changed files with 15050 additions and 25 deletions

View File

@@ -175,9 +175,9 @@ void LSPDocumentClient::requestSemanticHighlighting( bool reqFull ) {
Uint64 docModId = mDoc->getModificationId();
mServer->documentSemanticTokensFull(
mDoc->getURI(), delta, reqId, range,
[docClient, uri, server, docModId, this]( const auto&, LSPSemanticTokensDelta&& deltas ) {
BoolScopedOp op( mProcessingSemanticTokensResponse, true );
[docClient, uri, server, docModId]( const auto&, LSPSemanticTokensDelta&& deltas ) {
if ( server->hasDocumentClient( docClient ) && server->hasDocument( uri ) ) {
BoolScopedOp op( docClient->mProcessingSemanticTokensResponse, true );
docClient->mWaitingSemanticTokensResponse = false;
docClient->processTokens( std::move( deltas ), docModId );
}