[GD-Windows] .NET main loop
Brought to you by:
vexxed72
From: tweety <mi...@sy...> - 2004-02-18 02:14:25
|
Sorry if this is OT, and if it is, please redirect (IIS joke :) ) to the appropiate list. I'm writing a managed dx9 app and, coming from the c++ world (and seeing the sdk samples), my main loop is: MainForm form=new MainForm(); engine.Init(form); while(form.Created) { engine.Update(); engine.Render(); Application.DoEvents(); } engine.Dispose(); But I read in some blog that DoEvents is bad because it allocates ~200bytes per call (kinda a lot), forcing the form class into gen1 garbage collection. Now I'm asking you: what's the best way to do it? ---------------------------------- Peace and love, Tweety mi...@sy... - twe...@us... YahooID: tweety_04_01 |