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

.NET (Core and Framework)

 
AnswerRe: sending bytes from a pc to another using udp in vbwinsock (vb 2008) Pin
Abhinav S7-Apr-10 20:05
Abhinav S7-Apr-10 20:05 
AnswerRe: sending bytes from a pc to another using udp in vbwinsock (vb 2008) Pin
Rajesh Anuhya12-Apr-10 2:14
professionalRajesh Anuhya12-Apr-10 2:14 
AnswerRe: sending bytes from a pc to another using udp in vbwinsock (vb 2008) Pin
Michel Godfroid14-Apr-10 12:22
Michel Godfroid14-Apr-10 12:22 
QuestionDataReader.Read not working? [Solved] Pin
B-rad A7-Apr-10 11:15
B-rad A7-Apr-10 11:15 
AnswerRe: DataReader.Read not working? Pin
Pete O'Hanlon7-Apr-10 11:49
mvePete O'Hanlon7-Apr-10 11:49 
AnswerRe: DataReader.Read not working? Pin
jaypatel51211-Apr-10 1:56
jaypatel51211-Apr-10 1:56 
Questionthreading: always call delegate.EndInvoke? Pin
Mr.PoorEnglish7-Apr-10 10:30
Mr.PoorEnglish7-Apr-10 10:30 
AnswerRe: threading: always call delegate.EndInvoke? Pin
Alan N8-Apr-10 3:55
Alan N8-Apr-10 3:55 
I think you've been reading MSDN far too closely and I should state at the outset that I don't have an answer to the question. The confusion around this issue must arise out of inconsistencies in the Microsoft documentation. For example, there is a disparity between your reference and the information in Event Based Asynchronous Pattern[^]. The first gives the impression that the world will end if the EndInvoke call is omitted, yet the second does just that and does not explain why we're still here.

I haven't found an example that demonstrates a problem caused by not calling EndInvoke or been able to come up with one of my own. My own best idea to make something go wrong was this:
C#
internal void InvokeTest(Int32 count) {
  IAsyncResult ar;
  for (Int32 i = 0; i < count; i++) {
    TaskDelegate t = Task;
    ar = t.BeginInvoke(null, null);
    ar.AsyncWaitHandle.WaitOne();
  }
}

private void Task() {
  // create a big exception object
  throw new Exception('a', 64 * 1024);
}


I thought that the ignored exceptions on the invoked thread might be retained by the CLR until EndInvoke was called but find that there is no gradual upwards drift in memory useage (Process Explorer). If the Exception objects were not being collected it should be very obvious given the size of the associated exception message.

To err on the side of caution one should include EndInvoke but I can't find any compelling evidence one way or the other.

So no help from me then, but I thought your post was looking lonely!

Alan.
GeneralRe: threading: always call delegate.EndInvoke? Pin
Mr.PoorEnglish10-Apr-10 4:33
Mr.PoorEnglish10-Apr-10 4:33 
QuestionHow to pass value from Datagrid column to floating div column Pin
GladysRajan7-Apr-10 9:25
GladysRajan7-Apr-10 9:25 
QuestionExplorer Integration Pin
Jaymie7-Apr-10 2:42
Jaymie7-Apr-10 2:42 
AnswerRe: Explorer Integration Pin
Dave Kreskowiak7-Apr-10 4:51
mveDave Kreskowiak7-Apr-10 4:51 
Questionvb.net graphics, hue overlay? Pin
lilx2k6-Apr-10 20:50
lilx2k6-Apr-10 20:50 
AnswerRe: vb.net graphics, hue overlay? Pin
Dave Kreskowiak7-Apr-10 4:33
mveDave Kreskowiak7-Apr-10 4:33 
QuestionHelp needed saving an XML document from a VC++ 2008 .NET app Pin
Ger Hayden6-Apr-10 6:19
Ger Hayden6-Apr-10 6:19 
AnswerRe: Help needed saving an XML document from a VC++ 2008 .NET app Pin
Not Active6-Apr-10 8:46
mentorNot Active6-Apr-10 8:46 
AnswerRe: Help needed saving an XML document from a VC++ 2008 .NET app Pin
Estys7-Apr-10 1:25
Estys7-Apr-10 1:25 
GeneralRe: Help needed saving an XML document from a VC++ 2008 .NET app Pin
Ger Hayden7-Apr-10 23:24
Ger Hayden7-Apr-10 23:24 
QuestionSave Listview by Groups Pin
CeremBeyazit5-Apr-10 7:18
CeremBeyazit5-Apr-10 7:18 
QuestionGDI+ Architect Alternative? Pin
Som Shekhar3-Apr-10 8:36
Som Shekhar3-Apr-10 8:36 
Questionhow to programmatically get a list of resource file names in solution explorer [modified] Pin
fjparisIII2-Apr-10 23:46
fjparisIII2-Apr-10 23:46 
AnswerRe: how to programmatically get a list of resource file names in solution explorer Pin
Alan N3-Apr-10 10:21
Alan N3-Apr-10 10:21 
GeneralRe: how to programmatically get a list of resource file names in solution explorer Pin
fjparisIII3-Apr-10 10:46
fjparisIII3-Apr-10 10:46 
GeneralRe: how to programmatically get a list of resource file names in solution explorer Pin
Alan N3-Apr-10 13:32
Alan N3-Apr-10 13:32 
GeneralYour code works (SOLVED) Pin
fjparisIII4-Apr-10 14:36
fjparisIII4-Apr-10 14:36 

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.