John's console application calls my DLL function many times (~15x per sec). I am thinking to put this function as a static method.
I know that :
- It can only access static props and objects.
- It doesn't need an instance to run the function.
But I don't know if these are the only questions which i need to ask myself.
Each John's calls to my function is in a new thread that he creates.
- If there is an error in my function, how will this affect all other calls?
- Should I make this function a regular function with instance to the class (which John will create)?
- What about GC?
What is the best practice answer for this question?