Skip to content

Commit

Permalink
Comment regarding the ownership of grid
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiolo committed Dec 12, 2024
1 parent 81e74a0 commit 6475356
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cell.h
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,10 @@ struct Cell {
c = nullptr;
grid.reset(cg); // FIXME: could merge instead?
if (!HasText())
grid->MergeWithParent(parent->grid.get(), s, doc); // deletes grid/this.
// cg will be released from grid in the next step
// to unlink cg from its owning cell because the contents
// of cg will be merged into the parent grid and cg deleted afterwards
grid->MergeWithParent(parent->grid.get(), s, doc);
}
}

Expand Down

0 comments on commit 6475356

Please sign in to comment.