Tuesday, October 22, 2002 08:09 AM
To make the above Question more clear . I shall put it this way.
1] From the Class NCAEngine to be more specific in the run() method of NCAEngine . I want each thread inside NCAEngine to have its own copy of EngineConfig so I create an object of EngineConfig in the run method by saying EngineConfig e = new EngineConfig();
Now I know for sure that if I have all members and member functions of EngineConfig as Non Static. Than each NCAEngine
will have an individual own copy of the object e.
But My concern My Question is,
Q1]If I have all the memberfunctions and members as Static than will each NCAEngine have an individual own copy of the object e.???
IF yes . than Q2] and Q3]
Q2] what is the difference in the object created by using all memberss and member funcions as non static and the all member functions as static.
which is beter way of doing I mean from performance and memory issues.
Q3] Will this object created by using members and member functions static behave the same way under all circumstances as object created by using members and member functions as non static especially from the point of multithreading?
IF you can provide answers pointwise,I mean as per my Question.I shall highly Appreciate that.