Files
react-native/ReactCommon/react/renderer/uimanager/Android.mk
T
Samuel SuslaandFacebook GitHub Bot 34d189ae09 Introducing Leak Checker
Summary:
Changelog: [internal]

Introducing LeakChecker. A tool that checks if all native components have been cleaned up when surface is stopped.

**Known shortcomings**:
- LeakChecker is only enabled in debug builds and the existence of leaks is logged to console.
- For now, Leak Checker looks at N-1 screen. This is intentional as there is a known limitation of React that doesn't free up all shadow nodes when surface is stopped. Because of this, the use of LeakChecker is not intuitive and I'll work with React team to try to work around this.
- It doesn't help locating the leak, it only informs that leak is present. I'll be looking into ways to help locate the leak.

Reviewed By: JoshuaGross, mdvacca

Differential Revision: D26727461

fbshipit-source-id: 8350190b99f24642f8e15a3c2e1d79cfaa810d3d
2021-03-17 02:57:37 -07:00

42 lines
1.4 KiB
Makefile

# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := react_render_uimanager
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../
LOCAL_CFLAGS := \
-DLOG_TAG=\"Fabric\"
LOCAL_CFLAGS += -fexceptions -frtti -std=c++14 -Wall
LOCAL_STATIC_LIBRARIES :=
LOCAL_SHARED_LIBRARIES := libreact_render_graphics libfolly_futures libruntimeexecutor libreact_render_componentregistry glog libreactconfig libfolly_json libjsi libreact_render_core libreact_render_debug librrc_view librrc_root libreact_render_mounting libreact_debug libreact_render_leakchecker
include $(BUILD_SHARED_LIBRARY)
$(call import-module,glog)
$(call import-module,jsi)
$(call import-module,folly)
$(call import-module,react/config)
$(call import-module,react/renderer/components/root)
$(call import-module,react/renderer/components/view)
$(call import-module,react/renderer/componentregistry)
$(call import-module,react/renderer/core)
$(call import-module,react/renderer/leakchecker)
$(call import-module,react/renderer/debug)
$(call import-module,react/renderer/graphics)
$(call import-module,react/renderer/mounting)
$(call import-module,react/debug)
$(call import-module,runtimeexecutor)