multiple instances and variables

This is a discussion on multiple instances and variables within the Windows Programming forums, part of the Platform Specific Boards category; When you have several instances of a program running, are the variables insulated from one another, or do they use ...

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    51

    multiple instances and variables

    When you have several instances of a program running, are the variables insulated from one another, or do they use the same space? So, like if you were to like use static variables to hold values in your winproc, would they disturb one another?

    I have tried some experimenting to determine this, but I think I coded something wrong since my scroll bars worked perfectly, but my static class was disturbed. My lack of knowledge of programming windows was likely the problem, but I am still unsure of the answer.

    Thanks in advance

  2. #2
    uh oh
    Join Date
    Jan 2005
    Location
    Ontario, CA
    Posts
    66
    When running multiple instances your program will have it's own chunk of memory for each instance being run. In no way should they be 'disturbing' each other, unless of course you are running enough of them to cause major backlog in your CPU usage, or if there is low amounts of memory left. However, these would just slow down your computer and would have no effect on each other directly.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Best way to avoid using global variables
    By Canadian0469 in forum C++ Programming
    Replies: 7
    Last Post: 12-18-2008, 11:02 AM
  2. Global Variables, include files and classes
    By sharpstones in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2005, 10:06 AM
  3. Replies: 5
    Last Post: 11-19-2002, 06:49 PM
  4. Global variables? Bad! Yes, but to what extent?
    By Boksha in forum C++ Programming
    Replies: 6
    Last Post: 05-26-2002, 04:37 PM
  5. variables in instances of a class
    By alloc(MEM_NEWBIE) in forum C++ Programming
    Replies: 1
    Last Post: 04-08-2002, 01:35 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21