leapmotion/autowiring — pull request #15 by GabrielHare (2014-07-31 19:55:36+00:00)
Title: Ref implicitdecoration

Addressing corner cases in AutoPacket usage:

- Decoration with a null shared_ptr will yield a subsequent null dereference. It is now caught at the time of the decoration.
- Methods taking only auto_out inputs will be called twice on construction of an auto packet. This is prevented by determining all initial calls before making any.
- AutoPacket has a method Initialize that should be the first call applied to a packet to be issued, and a method Finalize that should be the last call applied to a packet before it is returned to its object pool. This delineates the AutoPacket lifecycle.
- ObjectPool has been modified to be facilitate consistency with the AutoPacket lifecycle.
- AutoPacket constructor and destructor do NOT make any calls to AutoFilter methods. This is handled by Initialize (for AutoFilter methods to be called on construction of a packet), Decorate and Finalize (for AutoFilter methods with unsatisfied optional arguments).
The last commit removes the strict life-cycle testing from AutoPacket, since this checks only the correct behavior of ObjectPool. A unit test should be created using an object that mimics the AutoPacket life-cycle awareness.