|
From: | Stefan Monnier |
Subject: | Re: [LONG] undo-tree and garbage collection: a request for advice from the gurus |
Date: | Sun, 02 May 2010 15:47:12 -0400 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> I spent quite a lot of time re-implementing `undo-tree-mode' so that > rather than transferring undo data out of `buffer-undo-list', > `buffer-undo-tree' instead stored pointers to undo changesets in > `buffer-undo-list'...only to eventually realise that this wasn't going to > solve anything! It'll work but only if your references into buffer-undo-list are weak (i.e. they don't prevent the pointed elements from being GC'd). For undo-equiv-table I do that by using a weak hash-table: (defconst undo-equiv-table (make-hash-table :test 'eq :weakness t) -- Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |