Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

Memory leak checker API. #3368

Merged
merged 4 commits into from
Sep 23, 2019
Merged

Memory leak checker API. #3368

merged 4 commits into from
Sep 23, 2019

Conversation

olonho
Copy link
Contributor

@olonho olonho commented Sep 20, 2019

No description provided.

/**
* If the memory leak checker is activated, by default true in debug mode, false in release.
* When memory leak checker is activated, and leak detected on process termination process
* is terminated with non-zero exit code.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, forgot to push update doc.

Copy link
Contributor

@SvyatoslavScherbina SvyatoslavScherbina Sep 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error message without termination is somewhat undiscoverable (including leaks in Kotlin/Native tests). Why not terminate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, OK, will update message as well.

* When memory leak checker is activated, and leak detected on process termination process
* is terminated with non-zero exit code.
*/
public var hasMemoryLeakChecker: Boolean
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name doesn't correspond to the behaviour.
Maybe isMemoryLeakCheckerEnabled?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed.

* is terminated with non-zero exit code.
* If the memory leak checker is activated, by default `true` in debug mode, `false` in release.
* When memory leak checker is activated, and leak is detected during last Kotlin/Native runtime
* deinitialization process - error message with leak information is printed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

during last Kotlin/Native runtime deinitialization process

This is unclear. Maybe align the terms with workers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would you suggest?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Workers seem to use "Kotlin context":

* Return the current worker. Worker context is accessible to any valid Kotlin context,

I suggest using the same phrase here, maybe described more verbosely (like "workers and platform threads ran Kotlin code"). Or maybe keep only the description, without "Kotlin context".

@olonho olonho merged commit b7e868a into master Sep 23, 2019
@olonho olonho deleted the leaks_no_crash branch September 23, 2019 14:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants