As a pointer, since you need a pointer to export it as a context property.

But you better post updated code, otherwise we might be talking about very different things.

Cheers,
_