On Mon, 28 Nov 2022 03:23:01 GMT, Justin King wrote:
> Fix memory leaks by making `AddOption` unconditionally duplicate passed in
> strings, taking ownership. Callers using dynamic memory free their storage
> after calling `AddOption`. This ensures no memory is dropped on the floor.
> This als
> Fix memory leaks by making `AddOption` unconditionally duplicate passed in
> strings, taking ownership. Callers using dynamic memory free their storage
> after calling `AddOption`. This ensures no memory is dropped on the floor.
> This also removes the second argument to `AddOption` as it is u
> Fix memory leaks by making `AddOption` unconditionally duplicate passed in
> strings, taking ownership. Callers using dynamic memory free their storage
> after calling `AddOption`. This ensures no memory is dropped on the floor.
> This also removes the second argument to `AddOption` as it is u
On Mon, 28 Nov 2022 03:23:01 GMT, Justin King wrote:
> Fix memory leaks by making `AddOption` unconditionally duplicate passed in
> strings, taking ownership. Callers using dynamic memory free their storage
> after calling `AddOption`. This ensures no memory is dropped on the floor.
> This als
On Mon, 28 Nov 2022 03:23:01 GMT, Justin King wrote:
> Fix memory leaks by making `AddOption` unconditionally duplicate passed in
> strings, taking ownership. Callers using dynamic memory free their storage
> after calling `AddOption`. This ensures no memory is dropped on the floor.
> This als
On Mon, 28 Nov 2022 03:23:01 GMT, Justin King wrote:
> Fix memory leaks by making `AddOption` unconditionally duplicate passed in
> strings, taking ownership. Callers using dynamic memory free their storage
> after calling `AddOption`. This ensures no memory is dropped on the floor.
> This als
On Mon, 28 Nov 2022 04:02:33 GMT, David Holmes wrote:
> Doesn't this just "leak" the duplicated string now instead of the original?
No, this frees all the strings in `FreeOptions()`.
-
PR: https://git.openjdk.org/jdk/pull/11384
On Mon, 28 Nov 2022 03:23:01 GMT, Justin King wrote:
> Fix memory leaks by making `AddOption` unconditionally duplicate passed in
> strings, taking ownership. Callers using dynamic memory free their storage
> after calling `AddOption`. This ensures no memory is dropped on the floor.
> This als
Fix memory leaks by making `AddOption` unconditionally duplicate passed in
strings, taking ownership. Callers using dynamic memory free their storage
after calling `AddOption`. This ensures no memory is dropped on the floor. This
also removes the second argument to `AddOption` as it is unused an