Remove _root from native Bytes
This commit is contained in:
@@ -30,7 +30,6 @@ namespace lime {
|
|||||||
|
|
||||||
unsigned char *_data;
|
unsigned char *_data;
|
||||||
int _length;
|
int _length;
|
||||||
AutoGCRoot *_root;
|
|
||||||
value _value;
|
value _value;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ namespace lime {
|
|||||||
|
|
||||||
_data = 0;
|
_data = 0;
|
||||||
_length = 0;
|
_length = 0;
|
||||||
_root = 0;
|
|
||||||
_value = 0;
|
_value = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -51,7 +50,6 @@ namespace lime {
|
|||||||
|
|
||||||
_data = 0;
|
_data = 0;
|
||||||
_length = 0;
|
_length = 0;
|
||||||
_root = 0;
|
|
||||||
_value = 0;
|
_value = 0;
|
||||||
|
|
||||||
Resize (size);
|
Resize (size);
|
||||||
@@ -65,7 +63,6 @@ namespace lime {
|
|||||||
|
|
||||||
_data = 0;
|
_data = 0;
|
||||||
_length = 0;
|
_length = 0;
|
||||||
_root = 0;
|
|
||||||
_value = 0;
|
_value = 0;
|
||||||
|
|
||||||
Set (bytes);
|
Set (bytes);
|
||||||
@@ -79,7 +76,6 @@ namespace lime {
|
|||||||
|
|
||||||
_data = 0;
|
_data = 0;
|
||||||
_length = 0;
|
_length = 0;
|
||||||
_root = 0;
|
|
||||||
_value = 0;
|
_value = 0;
|
||||||
|
|
||||||
ReadFile (path);
|
ReadFile (path);
|
||||||
@@ -93,7 +89,6 @@ namespace lime {
|
|||||||
|
|
||||||
_data = 0;
|
_data = 0;
|
||||||
_length = 0;
|
_length = 0;
|
||||||
_root = 0;
|
|
||||||
_value = 0;
|
_value = 0;
|
||||||
|
|
||||||
Set (data);
|
Set (data);
|
||||||
@@ -103,11 +98,7 @@ namespace lime {
|
|||||||
|
|
||||||
Bytes::~Bytes () {
|
Bytes::~Bytes () {
|
||||||
|
|
||||||
if (_root) {
|
|
||||||
|
|
||||||
delete _root;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,7 +157,6 @@ namespace lime {
|
|||||||
if (!_value) {
|
if (!_value) {
|
||||||
|
|
||||||
_value = alloc_empty_object ();
|
_value = alloc_empty_object ();
|
||||||
_root = new AutoGCRoot (_value);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,28 +215,9 @@ namespace lime {
|
|||||||
_data = 0;
|
_data = 0;
|
||||||
_value = 0;
|
_value = 0;
|
||||||
|
|
||||||
if (_root) {
|
|
||||||
|
|
||||||
delete _root;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
_root = 0;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
_value = bytes;
|
_value = bytes;
|
||||||
|
|
||||||
if (!_root) {
|
|
||||||
|
|
||||||
_root = new AutoGCRoot (_value);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
_root->set (_value);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
_length = val_int (val_field (bytes, id_length));
|
_length = val_int (val_field (bytes, id_length));
|
||||||
|
|
||||||
if (_length > 0) {
|
if (_length > 0) {
|
||||||
@@ -288,14 +259,6 @@ namespace lime {
|
|||||||
_data = 0;
|
_data = 0;
|
||||||
_length = 0;
|
_length = 0;
|
||||||
|
|
||||||
if (_root) {
|
|
||||||
|
|
||||||
delete _root;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
_root = 0;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user