Reviewed by Adam.
[WebKit-https.git] / JavaScriptCore / bindings / jni / jni_runtime.h
index 9d59862..b7acbe5 100644 (file)
@@ -171,20 +171,15 @@ class JavaField : public Field
 public:
     JavaField() : _field(0) {};
     JavaField (JNIEnv *env, jobject aField);
-    ~JavaField() {
-        delete _field;
-    };
 
     JavaField(const JavaField &other) : 
-        Field(), _name(other._name), _type(other._type), _field(other._field) {};
+        Field(), _name(other._name), _type(other._type) {};
 
     JavaField &operator=(const JavaField &other)
     {
         if (this == &other)
             return *this;
             
-        delete _field;
-        
         _name = other._name;
         _type = other._type;
         _field = other._field;
@@ -207,7 +202,7 @@ private:
     JavaString _name;
     JavaString _type;
     JNIType _JNIType;
-    JavaInstance *_field;
+    RefPtr<JObjectWrapper> _field;
 };