Skip to content

Use CastToAndDetach or a similar function to reduce GC pressure #1806

Closed

Description

@masesdevelopers

The original input arg0 will be abandoned after

var record = arg0.Cast<Org.Apache.Kafka.Clients.Consumer.ConsumerRecord<TJVMK, TJVMV>>(); // KNet consider the data within Apache Kafka Streams defined always as byte[]

A better approach is to avoid Cast operation which preserve the linkage on original IJavaObject that will need the GC to be retired.

Find occurrences of this pattern and replace it.

Metadata

Metadata

Labels

.NETPull requests that update .net codeKNetKNet related issueKNet Connect SDKKNet Connect SDK related issueperformancePerformance related issue

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions