New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Further memory leak fixes #1212
Conversation
What else were the issues? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it on MAC. No memory leaks when reopening tabs. Regarding ordering the memory increase until 600 Mb then it stops. Looks good
Just a comment for clarification:
|
I didn't see the @molnard's comment because we both commented at the same time.
I can confirm this. In my cases it stops after 780MB or so.
It does in my Linux. However it stops eating memory and goes back after GC pass. Looks good to me too. |
…ill allow for performance increase later.
The same errors for me on win10x64. One more thing to add: if you send and get the invalid thread exc then go into receive and generate a new receive address you will get:
|
@lontivero I took out the sorting headers because they trigger a bug in avalonia which I need to have fixed to stop memory leak. |
Will fix the threading issues |
is this the next step? |
That's been worked on in avalonia, did you verify if my fix solved the issue with send tab? |
yes it is OK now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good Tab open/close memleak gone!
WalletWasabi.Gui/Controls/WalletExplorer/WalletInfoViewModel.cs
Outdated
Show resolved
Hide resolved
Merge master into memory-leaks
OperationMessage = "Dequeuing coins...Please wait"; | ||
var canCancel = this.WhenAnyValue(x => x.IsBusy); | ||
var canOk = this.WhenAnyValue(x => x.IsBusy, (isbusy) => !isbusy); | ||
|
||
CancelTokenSource = new CancellationTokenSource().DisposeWith(Disposables); | ||
CancelTokenSource = new CancellationTokenSource(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be disposed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
#pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed | ||
}).DisposeWith(Disposables); | ||
.Subscribe(async _ => await RewriteTableAsync()) | ||
.DisposeWith(_disposables); | ||
|
||
this.WhenAnyValue(x => x.SelectedTransaction).Subscribe(transaction => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also defined in the constructor. Remove this or that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still there?
_model = model; | ||
ClipboardNotificationVisible = false; | ||
ClipboardNotificationOpacity = 0; | ||
|
||
_confirmed = model.WhenAnyValue(x => x.Confirmed).ToProperty(this, x => x.Confirmed, model.Confirmed).DisposeWith(Disposables); | ||
|
||
//TODO: this should be disposed! Memory leak! | ||
Global.UiConfig.WhenAnyValue(x => x.LurkingWifeMode).Subscribe(x => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be disposed! Memory leak!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
fix memleak on walletinfotab
Closes #1001
Closes #1094
Removed use of IDisposable in viewmodels, this is not really the correct way to handle this.
Added support in Shell for detecting when a Tab is opened
Initialise and deinitialise coinlist stuff when tab is opened and closed (freeing the memory).