|
-
Nov 12th, 2004, 05:34 PM
#1
Thread Starter
PowerPoster
Includes and their size
I have tried to get myself into the habit of making sure I HAVE to include a thing like windows.h before I do...and if I do I almost always put the WIN32_LEAN_AND_MEAN macro.
Well, I have a WaveClass which is used to load up waves and such with play functions...but mainly I just need to loaded wave to pass into DirectSound Buffers.
The wave class needs GlobalAlloc, and GlobalLock, BYTE, DWORD...etc
I have to include MMSystem.h, and Windows.h. Will this lengthen the size in memory of the wave class?
There is a good chance I could have 100+ of these class's loaded at any time. If those extra includes are goona cause some runtime slowdowns or extra size during runtime then i need to find a way around it.
"From what was there, and was meant to be, but not of that was faded away." - - Steve Damm
"The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm
"When you do things right, people won't be sure if you did anything at all." - - God from Futurama
-
Nov 12th, 2004, 05:43 PM
#2
Not 100% sure...but pretty.....it will only include it one time...not every time for every new object. So no, it won't make that much diffrence.
-
Nov 14th, 2004, 08:38 AM
#3
Properly written header files, especially system includes, never increase final code size, only compile time. The only exception are inlines, which ought to be thrown out if not used.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Nov 14th, 2004, 09:13 AM
#4
Originally posted by CornedBee
Properly written header files, especially system includes, never increase final code size, only compile time. The only exception are inlines, which ought to be thrown out if not used.
What about Templates...they would do that too, wont they?
-
Nov 14th, 2004, 09:25 AM
#5
Templates only exist in the final code if you actually use them.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|