From: Sylvester Keil Date: 2011-12-05T18:54:56+09:00 Subject: Re: [Ruby C] Using DATA_PTR in multiple methods On Dec 5, 2011, at 12:38 AM, Hans Mackowiak wrote: > your alloc method does not create an object, change > TSK_IMG_INFO *ptr; > to > TSK_IMG_INFO *ptr = new TSK_IMG_INFO; Is this a C++ extensions? I would be careful mixing new/delete and Ruby's x-allocators. Why would you do that here? Would it not be better to use xmalloc and Data_Wrap_Struct?