
does static class member change class size?
I've got a class in a DLL that applications use. If I add members,
even private ones, to my class the application has to recompile
because the size of the class (e.g. the chunk of memory allocated
when I new a class) increases. This is somewhat of a problem
because I have many applications running in many places.
Currently I'm contemplating adding a feature to the class that
could easily be represented by a private static data member (int)
Will adding a static member change the layout? In other words,
do I risk heap corruption if I add a static member and not recompile?
I'm guessing that statics class members are treated like global
variables by the linker but I'm not sure.
Thanks,
Andrew Queisser