Note that there are some explanatory texts on larger screens.

plurals
  1. USFlorianZ
    primarykey
    data
    text
    plurals
    1. This table or related slice is empty.
    1. COcasablanca, thanks for your fast response and thanks for fixing the source tag in my OT! I have considered a similar method like you suggest, but like you correctly noted, I won't be able to create objects on the stack, anymore. I have thought about checking in the ObjectBase constructor, whether the allocator field points to a valid allocator instance and if not, considering the object to be on the stack. However, this is dangerous business, considering that there is some (although small) chance that the uninitialized allocator field just happens to point to a valid allocator.
      singulars
    2. CO@casablanca. That's a pretty good idea, too! My only concern with this is that it's probably not thread-safe. What if a context switch occurs after the operator new returns, but before the constructor gets a chance to consume the currentAllocator variable. If allocations are then executed in the second thread, currentAllocator would then be compromised. Any ideas as to how to make your solution thread-safe?
      singulars
    3. COI agree with you. I split my code up into the appropriate methods. However, my problem is that I need to create a link between Obj-C and C++ and my game architecture requires for the input to be polled instead of being handled once events are triggered. That is why I am storing the touches in a STL vector. Anyways, your information about the UITouch object being persistent over time helped a lot. Now, I am using the address to the object as key to uniquely identify a touch. Works like a charm. Thank you.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload