Skip to content

BulletManager

KuSpa edited this page Feb 16, 2018 · 4 revisions

What is a BulletManager and is he dangerous?

Contracts are only executed, when they get called from outside their Object. To provide that behavior, every Object with an Contract installed on registers itself here at the first time a Contract would trigger.

The Object gets registered in a WeakIdentityKeyDictionarey mapping from Object to a Boolean. When the Boolean is true, the Object is "armed", meaning, that the next Method call cannot be sent by a Contract. When it gets called and a Contract is triggered, it will set the Objects Boolean to false (or "shoot"). When the Contract is about to finish, the last thing he does is to set the Boolean back to true (e.g. reload). This prevents a infinite recursion (see here).

Clone this wiki locally