On 7/19/06, Peter Ritchie <[EMAIL PROTECTED]> wrote:
I'd love to have someone prove me wrong, or right, about one UI Thread per process (and "try doing this, it works" doesn't cut it, see above).
Host: MarkRi (Microsoft) Q: So it would seem to me that it is possible and that I can have more than one message loop per process. However, is this recommended? If so, what do I need to look out for? A: You can have multiple UI threads per process, but you must call Application.Run() on each thread. You can also call ShowDialog() instead of Run(). ShowDialog() creates a message loop. The tricky part is that we don't support having those UI components interacting natively -- you'll have to do your own marshalling using Invoke/BeginInvoke. http://msdn.microsoft.com/chats/transcripts/vstudio/vstudio_021004.aspx
Like "int * p = new int[1];delete [] p; *p=1;" in C++; it usually works, but it's bad-- but, I digress).
Dereferencing a freed pointer has undefined behavior and although it will only corrupt the heap with most compilers' allocators, the compiler is free to generate code that formats your hard disk. Cheers, Stoyan =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
