Integrated: 8273414: ResourceObj::operator delete should handle nullptr in debug builds

Leo Korinth lkorinth at openjdk.java.net
Tue Sep 14 21:23:23 UTC 2021


On Tue, 7 Sep 2021 09:40:33 GMT, Leo Korinth <lkorinth at openjdk.org> wrote:

> This is how delete usually works, This is also how FreeHeap and CHeapObj::operator delete works. Delete does handle nullptr in release builds, it is the assert that may crash. Also, as a user it is nice to call delete without first checking the argument for nullptr.

This pull request has now been integrated.

Changeset: e66bf472
Author:    Leo Korinth <lkorinth at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/e66bf472484f6873faf45d634f17b68777fdcfa6
Stats:     3 lines in 1 file changed: 3 ins; 0 del; 0 mod

8273414: ResourceObj::operator delete should handle nullptr in debug builds

Reviewed-by: stuefe

-------------

PR: https://git.openjdk.java.net/jdk/pull/5385


More information about the hotspot-runtime-dev mailing list