mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Make FileAccess and DirAccess classes reference counted.
This commit is contained in:
parent
ca9372622f
commit
9381acb6a4
193 changed files with 1122 additions and 1776 deletions
|
@ -472,7 +472,7 @@ Error XMLParser::open_buffer(const Vector<uint8_t> &p_buffer) {
|
|||
|
||||
Error XMLParser::open(const String &p_path) {
|
||||
Error err;
|
||||
FileAccess *file = FileAccess::open(p_path, FileAccess::READ, &err);
|
||||
Ref<FileAccess> file = FileAccess::open(p_path, FileAccess::READ, &err);
|
||||
|
||||
ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot open file '" + p_path + "'.");
|
||||
|
||||
|
@ -488,8 +488,6 @@ Error XMLParser::open(const String &p_path) {
|
|||
data[length] = 0;
|
||||
P = data;
|
||||
|
||||
memdelete(file);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue