btzy / circuit-sandbox

GNU General Public License v3.0
3 stars 1 forks source link

Files are held open solely by communicators that exist in the clipboard #39

Closed btzy closed 6 years ago

btzy commented 6 years ago

As clipboards (both the default and numbered ones) hold CanvasState to represent their the clipboard data, file referenced by communicators that only exist in the clipboards are held open. This might be un-intuitive to the user.

Possible fix: Make the clipboards store HistoryCanvasState instead of CanvasState. The file communicators in HistoryCanvasState will lose their backing communicators (and referenced files) if no CanvasState holds the same backing communicator (which means that the current canvas does not contain that backing communicator.