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:
parent
7b4735af81
commit
69bc0f317c
2 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
2
v8_ref.h
2
v8_ref.h
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue