From: Yukihiro Matsumoto Date: 2008-03-31T15:29:05+09:00 Subject: Re: mark, alloc and free functions in C extensions Hi, In message "Re: mark, alloc and free functions in C extensions" on Sun, 30 Mar 2008 20:12:38 +0900, "=?ISO-8859-1?Q?Gerardo_Santana_G=F3mez_Garrido?=" writes: |I have a class A written in C that contains a C structure. I have |defined the functions mark, alloc and free. | |I have another class B, written in C, that derives from class A and |adds another piece of C data. | |Should the class B define mark, alloc and free functions for both, |class A and class B, C structures? | |Or sould the class B care for its own C structure only? Will Ruby's |marking, allocation and liberation mechanism call their respective |functions? It's hard to say for sure without seeing your code, but basically your functions for class B should handle whole body of C structure (both A and B). matz.