Just pass the DIComposite type by value instead of by pointer.