Skip to content
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

RxExample memory leaks in xCode 10 Memory Graph Debugger #1773

Closed
FloMZzz opened this issue Oct 16, 2018 · 3 comments
Closed

RxExample memory leaks in xCode 10 Memory Graph Debugger #1773

FloMZzz opened this issue Oct 16, 2018 · 3 comments

Comments

@FloMZzz
Copy link

FloMZzz commented Oct 16, 2018

Short description of the issue:

When running RxExamples (e.g. Adding Numbers), I got memory leak reports in xCode Memory Graph Debugger.

Steps to reproduce:

  1. Download or clone the latest revision of RxSwift (0df62b4 for me)
  2. Just run RxExample in xCode
  3. Go to "Adding Numbers"
  4. Play a little with values there
  5. Return back to the list of examples
  6. Press Memory Graph Debugger icon and see 5 memory leaks reported (see the screenshot attached).

Expected outcome:

No memory leaks reported.

What actually happens:

Multiple memory leaks appear.

Platform/Environment

  • [*] iOS

How easy is to reproduce? (chances of successful reproduce after running the self contained code)

  • [*] easy, 100% repro

Xcode version:

10 (10A255)

Is it a bug in RxSwift/RxExample, or is it a bug in xCode?

@FloMZzz
Copy link
Author

FloMZzz commented Oct 16, 2018

2018-10-16 20 15 11

@Maru-zhang
Copy link

After my test, if you use iOS11.* simulator, it's all work fine. The "memery leak" only happen in lastest simulator. But if you use iOS12 simulator, the UITextField will not be released after NumberViewController release(mabe because of storyboard, if you use code, that's all fine), and next time you navigate to NumberViewController, the UITextField in last NumberViewController will be released.

@kzaher
Copy link
Member

kzaher commented Oct 28, 2018

Since it looks like UIKit is performing some internal optimizations, I've removed that code because it can't work with the current implementation of UIKit.

@kzaher kzaher closed this as completed Oct 28, 2018
kzaher added a commit that referenced this issue Oct 28, 2018
…me internal optimizations and caches UI elements. #1773
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

No branches or pull requests

3 participants