question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SafeArea Memory Leak

See original GitHub issue

I used SafeAreaView inside a view on ios simulator memory usage grow up fast recently simulator show warning is shaking and on this case also this safeArea is shaking I bleave each time safe are calculate offset keep it a memory that means more calculate more memory watch the gif

without safe area (1mb take time)

Screen-Recording-2020-03-24-at-11 27 36

with safe area (3mb take time)

Screen-Recording-2020-03-24-at-11 24 47 it’s going over 2gb and crashing

 <View style={styles.footer}>
          <Button
            square
            disabled={disabled}
            onPress={this.submit}
            style={StyleSheet.flatten([
              styles.registerOrder,
              orderType === 'buy' ? styles.submitBuy : styles.submitSell,
            ])}
            size="large"
          >
            <SafeAreaView>
              <Typography
                text={`${t(isEdit ? 'Edit Order' : 'Register Order')} ${
                  this.state.orderCount > 0 ? this.state.orderCount : ''
                }`}
                variant="button"
              />
            </SafeAreaView>
          </Button>
        </View>

React Native version:

System:
    OS: macOS 10.15.3
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 998.20 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.16.1 - /usr/local/bin/node
    Yarn: 1.19.2 - /usr/local/bin/yarn
    npm: 6.13.7 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 28, 29
      Build Tools: 28.0.3, 29.0.2
      System Images: android-29 | Google Play Intel x86 Atom
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5977832
    Xcode: 11.3/11C29 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0 
    react-native: 0.61.5 => 0.61.5 
  npmGlobalPackages:
    create-react-native-web-app: 0.1.14

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:5
  • Comments:10

github_iconTop GitHub Comments

5reactions
YesSkyscraperscommented, Apr 22, 2020

same here… unreal CPU usage when the safeareaview starts to twitch…

1reaction
YesSkyscraperscommented, Apr 23, 2020

Yep, I replaced it by SafeAreaView from react-native-safe-area-view too. Thats work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

View with multiple layers dont relese memory - Stack Overflow
I create custom View: final class Clock: UIView { lazy var hourArrow: CALayer = { let layer = CALayer() layer.contents ...
Read more >
Preventing the Retain Cycle Memory Leak Of Strong Swift Arrays ...
The array itself can not be a weak reference. But its elements can be defined as weak references in some way. To achieve...
Read more >
Native engine memory leak detection system - Cocos Creator
Native engine memory leak detection system. The native engine is developed using the C++ language, and memory leaks are inevitable.
Read more >
glibc-2.11.3 - chromiumos/third_party/glibc - Git at Google
Fix alignment of AVX safe area on x86-64. ... Fix memory leak for some invalid regular expressions. More regex memory leak fixes and...
Read more >
[Answer]-Swift Memory Leaks-swift - appsloveworld.com
I need some help in identifying what's causing these memory leak's. I created a simple program to invoke an api and get data....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found