Skip to content

Commit 140ad5a

Browse files
authored
Merge pull request #629 from k163377/fix-value-parameters-cache
Changed to not cache valueParameters
2 parents 7493f7d + edef208 commit 140ad5a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/kotlin/com/fasterxml/jackson/module/kotlin/ValueCreator.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ internal sealed class ValueCreator<T> {
2424
/**
2525
* ValueParameters of the KFunction to be called.
2626
*/
27-
val valueParameters: List<KParameter> by lazy { callable.valueParameters }
27+
// If this result is cached, it will coexist with the SoftReference managed value in kotlin-reflect,
28+
// and there is a risk of doubling the memory consumption, so it should not be cached.
29+
// @see #584
30+
val valueParameters: List<KParameter> get() = callable.valueParameters
2831

2932
/**
3033
* Checking process to see if access from context is possible.

0 commit comments

Comments
 (0)