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

[Bug]: [iOS] Leak Memory #3740

Open
xiang23 opened this issue Jan 14, 2025 · 0 comments
Open

[Bug]: [iOS] Leak Memory #3740

xiang23 opened this issue Jan 14, 2025 · 0 comments
Labels
bug 🪲 Something isn't working

Comments

@xiang23
Copy link

xiang23 commented Jan 14, 2025

Mapbox Implementation

Mapbox

Mapbox Version

10.19.2

React Native Version

0.75.4

Platform

iOS

@rnmapbox/maps version

10.1.31

Standalone component to reproduce

can directly use the example. I observed it in BugReportExampleTS

import React from 'react';
import {
  MapView,
  ShapeSource,
  LineLayer,
  Camera,
} from '@rnmapbox/maps';

const aLine = {
  type: 'LineString',
  coordinates: [
    [-74.00597, 40.71427],
    [-74.00697, 40.71527],
  ],
};

class BugReportExample extends React.Component {
  render() {
    return (
      <MapView style={{flex: 1}}>
        <Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
        <ShapeSource id="idStreetLayer" shape={aLine}>
          <LineLayer id="idStreetLayer" />
        </ShapeSource>
      </MapView>
    );
  }
}

Observed behavior and steps to reproduce

1.Enter the page displaying the map.
2.Exit the page directly to return.
3.Re-enter the page displaying the map.

After merging #3708 , this issue only occurs on real devices and does not appear on simulators. After upgrading to RN 0.76, the problem disappears due to the default enablement of the new architecture and Bridgeless Mode. However, the issue remains noticeable on the traditional architecture.

I entered the page three times and exited each time, but in XCode, I can see that none of the three views were released.
QQ_1736849520324

Expected behavior

The memory was released normally.

Notes / preliminary analysis

No response

Additional links and references

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant