Skip to content

Memory leak: do not save objects if no references to cache #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

Hartigan
Copy link

@Hartigan Hartigan commented Jul 9, 2024

Hi

I found memory leak inside ReactiveAeroMapper.

This code allows to save objects into map, but do not increase/decrease reference count, therefore objects permanently stored inside cache. Sync version of mapper has begin() and end() calls for reference counting and doesn't have this problem.

I suggest add verification inside LoadedObjectResolver or add begin() and end() calls into ReactiveAeroMapper

Thanks

@reugn
Copy link
Member

reugn commented Jul 10, 2024

@Hartigan, why not call LoadedObjectResolver.begin(); and LoadedObjectResolver.end(); like it's in the blocking read method? In your proposed change, the condition of the if statement never seems to be satisfied.

@Hartigan
Copy link
Author

Hi @reugn
I assumed, what LoadedObjectResolver.begin()/end() removed by design from reactive version of mapper. And implementation details of LoadedObjectResolver says what objects not stored if no references to cache created.

@reugn reugn requested a review from tim-aero July 10, 2024 14:32
@reugn
Copy link
Member

reugn commented Jul 15, 2024

@Hartigan, the potential memory leak has been addressed in #165.

@Hartigan
Copy link
Author

Yes, its same issue

@reugn reugn closed this Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants