OSDN Git Service

Close writer.
authorNathanSweet <nathan.sweet@gmail.com>
Fri, 5 Apr 2013 17:31:36 +0000 (19:31 +0200)
committerNathanSweet <nathan.sweet@gmail.com>
Fri, 5 Apr 2013 17:31:36 +0000 (19:31 +0200)
gdx/src/com/badlogic/gdx/utils/Json.java

index d98808e..33ee50b 100644 (file)
@@ -206,6 +206,10 @@ public class Json {
                try {\r
                        writeValue(object, knownType, elementType);\r
                } finally {\r
+                       try {\r
+                               this.writer.close();\r
+                       } catch (IOException ignored) {\r
+                       }\r
                        this.writer = null;\r
                }\r
        }\r