mirror of
https://github.com/processing/processing4.git
synced 2026-02-05 06:39:20 +01:00
close Writer object from createWriter() (fixes #3705)
This commit is contained in:
@@ -1099,7 +1099,10 @@ public class JSONArray {
|
||||
|
||||
|
||||
public boolean save(File file, String options) {
|
||||
return write(PApplet.createWriter(file), options);
|
||||
PrintWriter writer = PApplet.createWriter(file);
|
||||
boolean success = write(writer, options);
|
||||
writer.close();
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user