1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-20 00:50:25 +02:00

Fixed memory leak

This commit is contained in:
Simon Lübeß 2022-08-13 21:20:04 +02:00
parent fefffd4f64
commit 9119443918

View file

@ -104,7 +104,15 @@ namespace IDE
public class BookmarkManager
{
public BookmarkFolder mRootFolder = new .();
public List<BookmarkFolder> mBookmarkFolders = new .() {mRootFolder} ~ DeleteContainerAndItems!(_);
public List<BookmarkFolder> mBookmarkFolders = new .() {mRootFolder} ~
{
while (!_.IsEmpty)
{
DeleteFolder(_.Back);
}
delete _;
};
/// Occurs when a bookmark/folder is added, removed or moved.
public Event<Action> BookmarksChanged ~ _.Dispose();