Click here to Skip to main content
15,905,912 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: ComboBox issues Pin
tuga-x17-Oct-07 3:45
tuga-x17-Oct-07 3:45 
GeneralRe: ComboBox issues Pin
Luc Pattyn17-Oct-07 14:53
sitebuilderLuc Pattyn17-Oct-07 14:53 
GeneralRe: ComboBox issues Pin
tuga-x17-Oct-07 23:02
tuga-x17-Oct-07 23:02 
GeneralRe: ComboBox issues Pin
Luc Pattyn18-Oct-07 2:52
sitebuilderLuc Pattyn18-Oct-07 2:52 
GeneralRe: ComboBox issues Pin
tuga-x18-Oct-07 2:57
tuga-x18-Oct-07 2:57 
GeneralRe: ComboBox issues Pin
Patrick Etc.18-Oct-07 9:16
Patrick Etc.18-Oct-07 9:16 
GeneralRe: ComboBox issues Pin
Luc Pattyn18-Oct-07 9:42
sitebuilderLuc Pattyn18-Oct-07 9:42 
GeneralRe: ComboBox issues Pin
Patrick Etc.18-Oct-07 9:56
Patrick Etc.18-Oct-07 9:56 
Luc Pattyn wrote:

[Added] I typically don't call dispose on controls, except for forms/dialogs, since
my controls tend to always be part of some Form, and I trust .NET to dispose properly
of the Controls that are used on a Form that gets Closed or Disposed.[/added]


I should have been more specific.. you shouldn't call Dispose on controls and GUIs. The framework is built to take care of that, and this example is proof enough of that. Dispose should only be called if the object is *really* never going to be needed again, which in this example is not true, and especially on desktop applications, is really an unnecessary code complication that will only lead to additional code to debug. (On CF applications, calling Dispose can be necessary because of the severely limited resources. Even so, I have never actually found it helpful or necessary to.)

Anywhere documentation tells you to call Dispose (Framework objects or 3rd party objects), you should call Dispose. For example I'm using a 3rd party serial port control that uses significant unmanaged resources and the application will lock up if they're not released.




"If you think of yourselves as helpless and ineffectual, it is certain that you will create a despotic government to be your master. The wise despot, therefore, maintains among his subjects a popular sense that they are helpless and ineffectual."
- Frank Herbert

GeneralRe: ComboBox issues Pin
Luc Pattyn18-Oct-07 10:41
sitebuilderLuc Pattyn18-Oct-07 10:41 
GeneralRe: ComboBox issues Pin
tuga-x18-Oct-07 22:19
tuga-x18-Oct-07 22:19 
QuestionValueType vs Reference Pin
rtalan17-Oct-07 0:16
rtalan17-Oct-07 0:16 
AnswerRe: ValueType vs Reference Pin
Robert Rohde17-Oct-07 0:27
Robert Rohde17-Oct-07 0:27 
GeneralRe: ValueType vs Reference Pin
rtalan17-Oct-07 0:48
rtalan17-Oct-07 0:48 
GeneralRe: ValueType vs Reference Pin
lmoelleb17-Oct-07 1:39
lmoelleb17-Oct-07 1:39 
GeneralRe: ValueType vs Reference Pin
rtalan17-Oct-07 1:53
rtalan17-Oct-07 1:53 
GeneralRe: ValueType vs Reference Pin
lmoelleb17-Oct-07 2:12
lmoelleb17-Oct-07 2:12 
GeneralRe: ValueType vs Reference Pin
rtalan17-Oct-07 2:42
rtalan17-Oct-07 2:42 
GeneralRe: ValueType vs Reference Pin
Luc Pattyn17-Oct-07 2:57
sitebuilderLuc Pattyn17-Oct-07 2:57 
GeneralRe: ValueType vs Reference Pin
rtalan17-Oct-07 3:31
rtalan17-Oct-07 3:31 
GeneralRe: ValueType vs Reference Pin
Luc Pattyn17-Oct-07 3:44
sitebuilderLuc Pattyn17-Oct-07 3:44 
GeneralRe: ValueType vs Reference Pin
lmoelleb17-Oct-07 4:46
lmoelleb17-Oct-07 4:46 
GeneralRe: ValueType vs Reference Pin
George L. Jackson17-Oct-07 12:24
George L. Jackson17-Oct-07 12:24 
GeneralRe: ValueType vs Reference Pin
DavidNohejl17-Oct-07 23:21
DavidNohejl17-Oct-07 23:21 
Questionhow to use Indesign files in asp.net Pin
gopal_Pandey16-Oct-07 18:56
gopal_Pandey16-Oct-07 18:56 
AnswerRe: how to use Indesign files in asp.net Pin
Pete O'Hanlon16-Oct-07 23:48
mvePete O'Hanlon16-Oct-07 23:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.