Static class with static member and memory allocation
-
Hi, I have a static class, and it contains a private static member for resource management. static class ConnectionManager { private static ResourceManager resmgr = new ResourceManager("myApplication.stringresources", Assembly.GetExecutingAssembly()); ---------- -------- '''''''''''' } initializing a static member this way, is this right way to do this? every time when this class is called, would it reinitialize the static member, creating new memory allocation? or would I have a single memory allocation alloted the first time class is refereneced? Thanks, herhighness
-
Hi, I have a static class, and it contains a private static member for resource management. static class ConnectionManager { private static ResourceManager resmgr = new ResourceManager("myApplication.stringresources", Assembly.GetExecutingAssembly()); ---------- -------- '''''''''''' } initializing a static member this way, is this right way to do this? every time when this class is called, would it reinitialize the static member, creating new memory allocation? or would I have a single memory allocation alloted the first time class is refereneced? Thanks, herhighness