Click here to Skip to main content
15,889,863 members
Home / Discussions / C#
   

C#

 
QuestionOpen Button Click Event Pin
boiDev5-Nov-08 7:15
boiDev5-Nov-08 7:15 
AnswerRe: Open Button Click Event Pin
Colin Angus Mackay5-Nov-08 7:24
Colin Angus Mackay5-Nov-08 7:24 
AnswerRe: Open Button Click Event Pin
nelsonpaixao5-Nov-08 14:07
nelsonpaixao5-Nov-08 14:07 
QuestionHow to programmatically release resources hold by Thread? Pin
Member 23244835-Nov-08 6:09
Member 23244835-Nov-08 6:09 
GeneralRe: How to programmatically release resources hold by Thread? Pin
led mike5-Nov-08 6:16
led mike5-Nov-08 6:16 
GeneralRe: How to programmatically release resources hold by Thread? Pin
Member 23244835-Nov-08 6:31
Member 23244835-Nov-08 6:31 
GeneralRe: How to programmatically release resources hold by Thread? Pin
led mike5-Nov-08 7:04
led mike5-Nov-08 7:04 
AnswerRe: How to programmatically release resources hold by Thread? Pin
Guffa5-Nov-08 6:54
Guffa5-Nov-08 6:54 
Unless the code in the threads are specifically written to support abortion, you should not abort them. Aborting a thread means that an exception is thrown in the thread, which can be anywhere in the code. If not every single line in the code is written with this in mind, it is very likely that the code will crash and leave resources hanging.

Create a way to tell the threads that they should finish. That way you can let them clean up the resources in a well behaved manner before exiting. You can for example use a synchronised variable in the thread class that you change from the main thread.

Despite everything, the person most likely to be fooling you next is yourself.

GeneralRe: How to programmatically release resources hold by Thread? Pin
Member 23244835-Nov-08 7:08
Member 23244835-Nov-08 7:08 
GeneralRe: How to programmatically release resources hold by Thread? Pin
Nicholas Butler5-Nov-08 9:46
sitebuilderNicholas Butler5-Nov-08 9:46 
GeneralRe: How to programmatically release resources hold by Thread? Pin
Member 23244835-Nov-08 10:29
Member 23244835-Nov-08 10:29 
GeneralRe: How to programmatically release resources hold by Thread? Pin
Nicholas Butler5-Nov-08 10:51
sitebuilderNicholas Butler5-Nov-08 10:51 
GeneralRe: How to programmatically release resources hold by Thread? Pin
Member 23244835-Nov-08 11:07
Member 23244835-Nov-08 11:07 
GeneralRe: How to programmatically release resources hold by Thread? Pin
Nicholas Butler5-Nov-08 11:41
sitebuilderNicholas Butler5-Nov-08 11:41 
GeneralRe: How to programmatically release resources hold by Thread? Pin
Member 23244835-Nov-08 12:10
Member 23244835-Nov-08 12:10 
GeneralRe: How to programmatically release resources hold by Thread? Pin
Nicholas Butler5-Nov-08 23:08
sitebuilderNicholas Butler5-Nov-08 23:08 
GeneralRe: How to programmatically release resources hold by Thread? Pin
N a v a n e e t h5-Nov-08 16:40
N a v a n e e t h5-Nov-08 16:40 
GeneralRe: How to programmatically release resources hold by Thread? Pin
Nicholas Butler5-Nov-08 23:07
sitebuilderNicholas Butler5-Nov-08 23:07 
GeneralRe: How to programmatically release resources hold by Thread? Pin
Member 23244836-Nov-08 6:27
Member 23244836-Nov-08 6:27 
GeneralRe: How to programmatically release resources hold by Thread? Pin
N a v a n e e t h6-Nov-08 16:30
N a v a n e e t h6-Nov-08 16:30 
QuestionActive Document Container applications in C# Pin
Rinu_Raj5-Nov-08 5:43
Rinu_Raj5-Nov-08 5:43 
Questioncopying data Pin
netJP12L5-Nov-08 5:40
netJP12L5-Nov-08 5:40 
AnswerRe: copying data Pin
adgonz5-Nov-08 6:04
adgonz5-Nov-08 6:04 
GeneralRe: copying data Pin
led mike5-Nov-08 6:18
led mike5-Nov-08 6:18 
GeneralRe: copying data Pin
netJP12L5-Nov-08 7:53
netJP12L5-Nov-08 7:53 

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.