Le 31/12/2016 à 16:13, Jean-Marc Lasgouttes a écrit :
Le 31/12/2016 à 15:48, Guillaume Munch a écrit :
Using weak pointers instead of naked pointers could be used to let you
know when an inset has been destroyed. The cursor could then check if
all slices are valid, and if not then fix itself. This would implement
the original intent that the pointer is "some kind of cache" (according
to a comment) for the slower thing you mention.
We can maybe measure how useful this cache is, and remove it if the
difference is not important (which is probably the case).
Removing the cached pointer requires some thinking as well, since
CursorSlice has no way of finding the inset on its own.