I said stick it in main because this is what my Update code looks like in my engine:
protected override void Update(GameTime gameTime)
{
gamedata.input.Update();
gamedata.writer.Update(gamedata);
gamedata.cam.Update(gamedata.input.p_up, gamedata.input.p_left);
gamedata.screens[gamedata.current_screen].Update(gamedata);
base.Update(gameTime);
}
and because this is what it looks like under draw:
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Viewport = new Viewport(
0,
(graphics.PreferredBackBufferHeight / 2) - ((graphics.PreferredBackBufferWidth / (int)gamedata.resolution.X) * (int)gamedata.resolution.Y) / 2,
graphics.PreferredBackBufferWidth,
(graphics.PreferredBackBufferWidth / (int)gamedata.resolution.X) * (int)gamedata.resolution.Y
);
GraphicsDevice.Clear(Color.Black);
spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.NonPremultiplied, SamplerState.PointClamp, null, null, null, gamedata.cam.GetTransform() * Matrix.CreateScale(new Vector3((float)graphics.PreferredBackBufferWidth / gamedata.game_width, (float)graphics.PreferredBackBufferWidth / gamedata.game_width, 1.0f)));
gamedata.screens[gamedata.current_screen].Draw(spriteBatch, textures, gamedata);
gamedata.writer.Draw(spriteBatch, textures[7], new Vector2(0,0), gamedata);
base.Draw(gameTime);
}
and it probably won't be changing a whole lot. If it does change, it'll be a line or two. GameData contains stuff like different screens, save data, camera, etc.
Personally, I don't think it'd be a crime if these things were side-by-side. That was my point. Not that you should badly structure code, but that creating a class just so you can have three functions didn't seem necessary to me.
---
About the memory management. Just like in the issue before, we're apparently talking about different things. I'm just saying that, when I used C++, a variable in my class was apparently being overwritten or something, somehow, causing very undesirable results. At least, that's what someone told me when I talked to them about it. I was quite new to C++ at the time, so the idea that my variable could just be overwritten willy-nilly in the memory because of something that was going on in the background that I didn't know about turned me off of it. Was this what was really happening? Idk. But I switched to C# because it was recommended to me, and I prefer it.