1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

use the generic ref memory management functions

This commit is contained in:
Charles Lowell 2009-12-07 09:54:20 +02:00
parent 7b4735af81
commit 69bc0f317c
2 changed files with 2 additions and 2 deletions

View file

@ -12,7 +12,7 @@ v8_cxt::v8_cxt() : v8_ref<Context>(Context::New()) {
VALUE v8_cxt_allocate(VALUE clazz) {
printf("This is the big leagues chew!\n");
v8_cxt* cxt = new v8_cxt();
return Data_Wrap_Struct(clazz, 0, 0, cxt);
return Data_Wrap_Struct(clazz, v8_ref_mark , v8_ref_free, cxt);
}

View file

@ -16,7 +16,7 @@ class v8_ref_data {
template <class T> class v8_ref : v8_ref_data {
public:
//takes a handle object and adds a new persistent handle for
//the referenced object.
//the referenced object
v8_ref(v8::Handle<T> object);
~v8_ref();
private: