Click here to Skip to main content
15,902,112 members
Home / Discussions / C#
   

C#

 
GeneralRe: Book Review? Pin
Anonymous28-Sep-05 22:25
Anonymous28-Sep-05 22:25 
QuestionSystem.Xml.Document : How to write special characters in an xml file ? Pin
smashingraph28-Sep-05 3:53
smashingraph28-Sep-05 3:53 
AnswerRe: System.Xml.Document : How to write special characters in an xml file ? Pin
Dave Kreskowiak28-Sep-05 6:24
mveDave Kreskowiak28-Sep-05 6:24 
GeneralRe: System.Xml.Document : How to write special characters in an xml file ? Pin
smashingraph28-Sep-05 21:50
smashingraph28-Sep-05 21:50 
QuestionReleasing Memory Pin
dbetting28-Sep-05 3:30
dbetting28-Sep-05 3:30 
AnswerRe: Releasing Memory Pin
Guffa28-Sep-05 5:22
Guffa28-Sep-05 5:22 
GeneralRe: Releasing Memory Pin
dbetting28-Sep-05 6:24
dbetting28-Sep-05 6:24 
GeneralRe: Releasing Memory Pin
Guffa28-Sep-05 9:03
Guffa28-Sep-05 9:03 
The Timer control for an example is a component that needs disposal. When you place a Timer control on the page, it will be added to the components collection, and will be disposed when the form is disposed.

Most controls in a form doesn't need disposal. They are fully managed, and will be collected by the garbage colector.

If you have a memory leak, it's much more likely on some object that you have created yourself, than in the code for the form.

dbetting wrote:
Just to see what would happen, I attempted to set FrmMasterParts to null. Unless I'm mistaken, if that did work, that would've made the memory block unreachable and it would never be released. At least that was the case in Delphi.

The memory management is different in .NET from Delphi or other languages using memory allocation/deallocation. The memory is not deallocated, it's collected by the garbage collector. You don't have to free the memory that is allocated. You just let the reference to the object go out of scope, and the object will be collected by the garbage collector.

The Dispose method of an object doesn't free the memory either. It's only used to dispose of unmanaged resources that the object uses. The memory used by the object itself is just left for the garbage collector to clean up.

---
b { font-weight: normal; }

GeneralRe: Releasing Memory Pin
Dave Kreskowiak28-Sep-05 9:36
mveDave Kreskowiak28-Sep-05 9:36 
GeneralRe: Releasing Memory Pin
dbetting28-Sep-05 11:04
dbetting28-Sep-05 11:04 
GeneralRe: Releasing Memory Pin
Dave Kreskowiak28-Sep-05 11:16
mveDave Kreskowiak28-Sep-05 11:16 
GeneralRe: Releasing Memory Pin
dbetting28-Sep-05 12:13
dbetting28-Sep-05 12:13 
GeneralRe: Releasing Memory Pin
Dave Kreskowiak28-Sep-05 14:30
mveDave Kreskowiak28-Sep-05 14:30 
GeneralRe: Releasing Memory Pin
dbetting29-Sep-05 1:51
dbetting29-Sep-05 1:51 
GeneralRe: Releasing Memory Pin
Dave Kreskowiak29-Sep-05 11:59
mveDave Kreskowiak29-Sep-05 11:59 
GeneralRe: Releasing Memory Pin
Dan Neely29-Sep-05 2:10
Dan Neely29-Sep-05 2:10 
QuestionCopy a Row from one DataView to another? Pin
thomasa28-Sep-05 2:38
thomasa28-Sep-05 2:38 
AnswerRe: Copy a Row from one DataView to another? Pin
Wjousts28-Sep-05 9:24
Wjousts28-Sep-05 9:24 
QuestionObfuscator - Crytografy code Pin
horacyjr28-Sep-05 1:47
horacyjr28-Sep-05 1:47 
AnswerRe: Obfuscator - Crytografy code Pin
Colin Angus Mackay28-Sep-05 2:33
Colin Angus Mackay28-Sep-05 2:33 
GeneralRe: Obfuscator - Crytografy code Pin
horacyjr28-Sep-05 3:27
horacyjr28-Sep-05 3:27 
QuestionModify app.config Pin
Talktorajeev28-Sep-05 1:47
Talktorajeev28-Sep-05 1:47 
QuestionHelp needed with cookies and WebRequest Pin
nzmike28-Sep-05 1:13
nzmike28-Sep-05 1:13 
AnswerRe: Help needed with cookies and WebRequest Pin
Guffa28-Sep-05 2:18
Guffa28-Sep-05 2:18 
GeneralRe: Help needed with cookies and WebRequest Pin
nzmike28-Sep-05 17:15
nzmike28-Sep-05 17:15 

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.