ok, looks like it fixed it

warning! dont try to manually do the pointer wrapping, ruby already does it
for you! heheh ;)

-----Original Message-----
From: Gaffer [mailto:gaffer / gaffer.org]
Sent: Sunday, May 18, 2003 11:48 PM
To: ruby-talk ML
Subject: Re: ruby garbage collection


i'm pretty sure i've tracked down the cause, this is my first time embedding
ruby and writing classes in c++,

so i didnt know you could override the singleton method new for a class, to
do the Data_Make_Struct,

so i was wrapping an outer 'husk' object with a member variable @data which
was pointing to a Data_Wrap_Struct around my c++ object created with new

pretty nasty, and i have no idea how the gc would have interpreted this (as
i did no marking)

now that i've deciphered how everything should work, my matrix/vector
classes should be as efficient as they should have always been with ruby

i'll post back when i have results, cheers

-----Original Message-----
From: Simon Strandgaard [mailto:0bz63fz3m1qt3001 / sneakemail.com]
Sent: Sunday, May 18, 2003 11:30 PM
To: ruby-talk ML
Subject: Re: ruby garbage collection


On Sun, 18 May 2003 22:39:17 +0900, Gaffer wrote:

> i think its actually the GC cleaning up matrix and vector classes (my own
> implementation extended in ruby, they just alloc and free using c++
> new/delete operators, matching my c++ classes: vector (float[4]} and
matrix
> float[16];

Can you reveal some of this code ?


> also, i'm not doing any marking myself in c, these are pretty primitive
c++
> classes, and never ref any other ruby objects, so i just implement the
free
> function ptr for the classes

OK


--
Simon Strandgaard