| 2883 | #endif |
| 2884 | |
| 2885 | Value::~Value() { |
| 2886 | switch (type_) { |
| 2887 | case nullValue: |
| 2888 | case intValue: |
| 2889 | case uintValue: |
| 2890 | case realValue: |
| 2891 | case booleanValue: |
| 2892 | break; |
| 2893 | case stringValue: |
| 2894 | if (allocated_) |
| 2895 | releaseStringValue(value_.string_); |
| 2896 | break; |
| 2897 | case arrayValue: |
| 2898 | case objectValue: |
| 2899 | delete value_.map_; |
| 2900 | break; |
| 2901 | default: |
| 2902 | JSON_ASSERT_UNREACHABLE; |
| 2903 | } |
| 2904 | |
| 2905 | if (comments_) |
| 2906 | delete[] comments_; |
| 2907 | |
| 2908 | if ( default_value_) |
| 2909 | delete default_value_; |
| 2910 | } |
| 2911 | |
| 2912 | Value& Value::operator=(Value other) { |
| 2913 | swap(other); |
nothing calls this directly
no test coverage detected