On Feb 8, 2011, at 12:53 AM, I=F1aki Baz Castillo wrote:
> 2011/2/8 Tony Arcieri <tony.arcieri / medioh.com>:
>>> After rechecking it I strongly think I must store the object "query"
>>> in a Hash. If not, the object clearly "dissapears" and could be
>>> legitimately GC'ed at any time.
>>=20
>> I'd think the resolver object would hold on to all active queries =
until
>> completed.
>=20
> Yes, that's work: the resolver object contains a hash attribute in
> which queries are stored until completed.

Use a ruby hash and supply mark and GC callbacks to Data_Wrap_Struct so =
the GC will keep track of it.