You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unlike fastcat::Manager::GetDeviceStates, fastcat::Manager::GetDeviceStatePointers dynamically allocates memory each time it is called. The vector is constructed and resized with each call of the function. This makes the function non real-time safe.
The text was updated successfully, but these errors were encountered:
The idea behind this function is to get fixed, shared pointers to device state data and that it would be called once by the application. Once the application has this array of pointer, it doesn't need to call this again and can just dereference it as needed to get the current state data.
I agree allocating the vector of array points is dynamically allocating memory which should be corrected. I think the best thing would be to pass a reference to this array like so:
Yes, that would be an easy way to fix it. It should probably be coupled with a function that allows the client application know how many states are present in the manager so that it can pre-allocate properly once.
Unlike
fastcat::Manager::GetDeviceStates
,fastcat::Manager::GetDeviceStatePointers
dynamically allocates memory each time it is called. The vector is constructed and resized with each call of the function. This makes the function non real-time safe.The text was updated successfully, but these errors were encountered: