Last active
September 26, 2018 19:02
-
-
Save BrightShadow/28dabbee5d513d2c9f4002501d57c2f3 to your computer and use it in GitHub Desktop.
Example WPF command with memory leak possibility.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public RelayCommand MyGreatCommand | |
{ | |
get | |
{ | |
return this.myGreatCommand ?? ( | |
this.myGreatCommand = new RelayCommand( | |
() => | |
{ | |
// some code here | |
}) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment