mirror of
https://github.com/openjdk/jdk18u.git
synced 2025-12-10 00:37:05 -06:00
8284549: JFR: FieldTable leaks FieldInfoTable member
Backport-of: 92f5e42696847de7e47e238412d2d541a11bccd7
This commit is contained in:
parent
6cc0a752eb
commit
191f045704
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -612,11 +612,11 @@ ObjectSampleWriter::ObjectSampleWriter(JfrCheckpointWriter& writer, EdgeStore* s
|
|||||||
assert(store != NULL, "invariant");
|
assert(store != NULL, "invariant");
|
||||||
assert(!store->is_empty(), "invariant");
|
assert(!store->is_empty(), "invariant");
|
||||||
register_serializers();
|
register_serializers();
|
||||||
sample_infos = NULL;
|
assert(field_infos == NULL, "Invariant");
|
||||||
ref_infos = NULL;
|
assert(sample_infos == NULL, "Invariant");
|
||||||
array_infos = NULL;
|
assert(ref_infos == NULL, "Invariant");
|
||||||
field_infos = NULL;
|
assert(array_infos == NULL, "Invariant");
|
||||||
root_infos = NULL;
|
assert(root_infos == NULL, "Invariant");
|
||||||
}
|
}
|
||||||
|
|
||||||
ObjectSampleWriter::~ObjectSampleWriter() {
|
ObjectSampleWriter::~ObjectSampleWriter() {
|
||||||
@ -625,6 +625,16 @@ ObjectSampleWriter::~ObjectSampleWriter() {
|
|||||||
write_array_infos(_writer);
|
write_array_infos(_writer);
|
||||||
write_field_infos(_writer);
|
write_field_infos(_writer);
|
||||||
write_root_descriptors(_writer);
|
write_root_descriptors(_writer);
|
||||||
|
|
||||||
|
// Followings are RA allocated, memory will be released automatically.
|
||||||
|
if (field_infos != NULL) {
|
||||||
|
field_infos->~FieldTable();
|
||||||
|
field_infos = NULL;
|
||||||
|
}
|
||||||
|
sample_infos = NULL;
|
||||||
|
ref_infos = NULL;
|
||||||
|
array_infos = NULL;
|
||||||
|
root_infos = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ObjectSampleWriter::operator()(StoredEdge& e) {
|
bool ObjectSampleWriter::operator()(StoredEdge& e) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user