mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Made JsonDocument's destructor protected (fixes #1480)
This commit is contained in:
		| @@ -36,3 +36,6 @@ build_should_fail(read_long_long) | ||||
| add_executable(write_long_long write_long_long.cpp) | ||||
| set_property(TARGET write_long_long PROPERTY CXX_STANDARD 11) | ||||
| build_should_fail(write_long_long) | ||||
|  | ||||
| add_executable(delete_jsondocument delete_jsondocument.cpp) | ||||
| build_should_fail(delete_jsondocument) | ||||
|   | ||||
							
								
								
									
										12
									
								
								extras/tests/FailingBuilds/delete_jsondocument.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								extras/tests/FailingBuilds/delete_jsondocument.cpp
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | ||||
| // ArduinoJson - arduinojson.org | ||||
| // Copyright Benoit Blanchon 2014-2021 | ||||
| // MIT License | ||||
|  | ||||
| #include <ArduinoJson.h> | ||||
|  | ||||
| struct Stream {}; | ||||
|  | ||||
| int main() { | ||||
|   JsonDocument* doc = new DynamicJsonDocument(42); | ||||
|   delete doc; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user