Skip to main content
added 10 characters in body
Source Link
Mike
  • 14.8k
  • 32
  • 122
  • 182

In my WPF-application, I call new windows in the following way:

_newWin = new WinWorkers_AddWorker(); _newWin.WindowState = this.WindowState; _newWin.Show(); 

Where _newWin is a private Window object.

My question is should I assign a null value to _newWin after I call _newWin.Show()?questions:

Will this decrease memory consumption because garbage collector / destructor will clean the null value objects earlier?

  1. Should I assign a null value to _newWin after I call _newWin.Show()?

  2. Will this decrease memory consumption because garbage collector / destructor will clean the null value objects earlier?

In my WPF-application, I call new windows in the following way:

_newWin = new WinWorkers_AddWorker(); _newWin.WindowState = this.WindowState; _newWin.Show(); 

Where _newWin is a private Window object.

My question is should I assign a null value to _newWin after I call _newWin.Show()?

Will this decrease memory consumption because garbage collector / destructor will clean the null value objects earlier?

In my WPF-application, I call new windows in the following way:

_newWin = new WinWorkers_AddWorker(); _newWin.WindowState = this.WindowState; _newWin.Show(); 

Where _newWin is a private Window object.

My questions:

  1. Should I assign a null value to _newWin after I call _newWin.Show()?

  2. Will this decrease memory consumption because garbage collector / destructor will clean the null value objects earlier?

formatting
Source Link
Mike
  • 14.8k
  • 32
  • 122
  • 182

In my WPF-application, I call new windows in the following way:

_newWin = new WinWorkers_AddWorker(); _newWin.WindowState = this.WindowState; _newWin.Show(); 
_newWin = new WinWorkers_AddWorker(); _newWin.WindowState = this.WindowState; _newWin.Show(); 

Where _newWin is a private Window object.

My question is should I assign a null value to _newWin after I call _newWin.Show()?

Will this decrease memory consumption because garbage collector / destructor will clean the null value objects earlier?

Thanks.

In my WPF-application, I call new windows in the following way:

_newWin = new WinWorkers_AddWorker(); _newWin.WindowState = this.WindowState; _newWin.Show(); 

Where _newWin is a private Window object.

My question is should I assign a null value to _newWin after I call _newWin.Show()?

Will this decrease memory consumption because garbage collector / destructor will clean the null value objects earlier?

Thanks.

In my WPF-application, I call new windows in the following way:

_newWin = new WinWorkers_AddWorker(); _newWin.WindowState = this.WindowState; _newWin.Show(); 

Where _newWin is a private Window object.

My question is should I assign a null value to _newWin after I call _newWin.Show()?

Will this decrease memory consumption because garbage collector / destructor will clean the null value objects earlier?

spelling & grammar
Source Link
Mike
  • 14.8k
  • 32
  • 122
  • 182

Memory consuption code optimization, a garbage collector questiontheory

In my WPF-application, I call new windows in the following way:

_newWin = new WinWorkers_AddWorker(); _newWin.WindowState = this.WindowState; _newWin.Show(); 

Where _newWin is a private Window object.

My question is should I assign a null value to _newWin after I call _newWin.Show()?

Will this decrease memory consumption, because garbage collector / destructor will clean athe null value objects earlier?

Thanks.

Memory consuption code optimization, a garbage collector question

In my WPF-application I call new windows in the following way:

_newWin = new WinWorkers_AddWorker(); _newWin.WindowState = this.WindowState; _newWin.Show(); 

Where _newWin is a private Window object.

My question is should I assign a null value to _newWin after I call _newWin.Show()?

Will this decrease memory consumption, because garbage collector / destructor will clean a null value objects earlier?

Thanks.

Memory consuption code optimization, a garbage collector theory

In my WPF-application, I call new windows in the following way:

_newWin = new WinWorkers_AddWorker(); _newWin.WindowState = this.WindowState; _newWin.Show(); 

Where _newWin is a private Window object.

My question is should I assign a null value to _newWin after I call _newWin.Show()?

Will this decrease memory consumption because garbage collector / destructor will clean the null value objects earlier?

Thanks.

Source Link
Mike
  • 14.8k
  • 32
  • 122
  • 182
Loading