Saturday, 7 September 2013

Static Variable in C-Style Function within DLL

Static Variable in C-Style Function within DLL

Say there exists a function within a DLL like so:
const Object *Get( void )
{
static Object instance;
return &instance;
}
Where in memory will this static object be located? If this function is
called from multiple other DLLs, will more than one copy of this static
object exist?

No comments:

Post a Comment