prebid-mobile-ios icon indicating copy to clipboard operation
prebid-mobile-ios copied to clipboard

Memory Leak when fetch Demand

Open rBeefrz opened this issue 11 months ago • 1 comments

Describe the bug A clear and concise description of what the bug is. Memory leak on calling fetchdemand.

To Reproduce Steps to reproduce the behavior: Call FetchDemand, see stack traces below:

Skärmavbild 2024-02-21 kl  10 20 42 (1)

Skärmavbild 2024-02-21 kl  10 19 17 (1) (1)

Expected behavior A clear and concise description of what you expected to happen. No memory leak reported in instrument

Smartphone (please complete the following information):

  • Device: iphone 14
  • OS: v16

Additional context Perhaps linked to https://developer.apple.com/documentation/foundation/urlsession/1411597-init & this when .invalidate() is currently used in the AdUnit.swift (not sure here.)

rBeefrz avatar Feb 29 '24 15:02 rBeefrz

@rBeefrz was this recorded in a debug build? A strong Self is passed in a debug build on line 223 of PrebidServerConnection.swift which can definitely cause memory leaks.

jsligh avatar Jun 05 '24 18:06 jsligh