do I need to lock & unlock here...

If I have a function like this should I put CritSel' around it? As if two threads came at the same time it would create two seperate pointer locations so no conflicts, as it returns the pointer?

Example not actual code
1
2
3
4
5
6
7
8
9
10
11
12
13
clsCat* GetNewCat()
{
  clsCat *catOne = new clasCat;

  catOne->method;
  catOne->method2;
  catOne->method3;
  ....
  etc

  return catOne
}
new is thread-safe, so there's no point in using a mutex here.
Lovely jubbly :)
Topic archived. No new replies allowed.