John Ehresman:
> I was thinking of ref counting the layout objects and if the cache
> decides to free up an entry with a non-0 ref count, it would set the
> inCache attribute to false rather than deleting it. The layout would
> then be deleted when its ref count goes to 0.
There would have to be some extra checking in the Retrieve code so
that the request that was causing this deletion was satisfied by
returning an uncached layout.
I don't think the current code should ever have more than one
LineLayout checked out of the cache at any time and an assertion on
this would reveal code that could fail. If this is the case then the
refcount code would never get tested after the NotifyPainted issue is
fixed. I'm not sure it is a good idea to include such code if it is
not normally exercised.
The AutoLineLayout causing the crash in NotifyPainted should be
reset at the end of the lines loop with
ll.Set(0);
Committed to CVS.
Neil
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest