I have an application that has an array of pointers to MyObject objects:
MyObject **arr;
arr= new MyObject*[10];
The application has two threads, these threads will create and delete new MyObject() to array arr. Therefore arr[n] will be changed all the time, however the MyObject's themselves do not change.
Should I just declare:
volatile MyObject **arr;
Or should I go with:
MyObject ** volatile arr;
Thanks in advance