.NET main loop
"tweety" <[email protected]>
| Newsgroups | gmane.games.devel.windows |
|---|---|
| Message-ID | <20040218020939.EPHE23158.tomts10-srv.bellnexxia.net@xp2500> |
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
[email protected] - [email protected]
YahooID: tweety_04_01