Skip to content
This repository was archived by the owner on Mar 19, 2026. It is now read-only.

Commit 7b9cf3b

Browse files
committed
Fix memory issues
1 parent dd40e10 commit 7b9cf3b

21 files changed

Lines changed: 474 additions & 319 deletions

.vscode/launch.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
// IntelliSense를 사용하여 가능한 특성에 대해 알아보세요.
3+
// 기존 특성에 대한 설명을 보려면 가리킵니다.
4+
// 자세한 내용을 보려면 https://go.microsoft.com/fwlink/?linkid=830387을(를) 방문하세요.
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "flutter_pixelmatching",
9+
"request": "launch",
10+
"type": "dart"
11+
},
12+
{
13+
"name": "flutter_pixelmatching (profile mode)",
14+
"request": "launch",
15+
"type": "dart",
16+
"flutterMode": "profile"
17+
},
18+
{
19+
"name": "flutter_pixelmatching (release mode)",
20+
"request": "launch",
21+
"type": "dart",
22+
"flutterMode": "release"
23+
},
24+
{
25+
"name": "example",
26+
"cwd": "example",
27+
"request": "launch",
28+
"type": "dart"
29+
},
30+
{
31+
"name": "example (profile mode)",
32+
"cwd": "example",
33+
"request": "launch",
34+
"type": "dart",
35+
"flutterMode": "profile"
36+
},
37+
{
38+
"name": "example (release mode)",
39+
"cwd": "example",
40+
"request": "launch",
41+
"type": "dart",
42+
"flutterMode": "release"
43+
}
44+
]
45+
}

android/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ find_library(log-lib log)
1919
add_library(
2020
opencv_pixelmatching
2121
SHARED
22-
../pixelmatching/debug_logger.cpp
23-
../pixelmatching/image_converter.cpp
24-
../pixelmatching/image_processor.cpp
25-
../pixelmatching/pixel_matching.cpp
22+
../pixelmatching/DebugLogger.cpp
23+
../pixelmatching/ImageConverter.cpp
24+
../pixelmatching/ImageProcessor.cpp
25+
../pixelmatching/ImageCompare.cpp
26+
../pixelmatching/PixelMatching.cpp
2627
)
2728
target_link_libraries(
2829
opencv_pixelmatching

example/android/app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ android {
6161
// TODO: Add your own signing config for the release build.
6262
// Signing with the debug keys for now, so `flutter run --release` works.
6363
signingConfig signingConfigs.debug
64+
6465
}
6566
}
6667
}
Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,42 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="io.lowapple.flutter.plugin.pixelmatching.example">
2+
package="io.lowapple.flutter.plugin.pixelmatching.example">
33

4-
<uses-permission android:name="android.permission.INTERNET" />
5-
<uses-permission android:name="android.permission.CAMERA" />
4+
<uses-permission android:name="android.permission.INTERNET"/>
5+
<uses-permission android:name="android.permission.CAMERA"/>
6+
<uses-permission android:name="android.permission.FLASHLIGHT"/>
7+
8+
<uses-feature
9+
android:name="android.hardware.camera"
10+
android:required="true"/>
611

712
<application
8-
android:name="${applicationName}"
9-
android:icon="@mipmap/ic_launcher"
10-
android:label="PixelMatching Sample">
13+
android:name="${applicationName}"
14+
android:icon="@mipmap/ic_launcher"
15+
android:label="PixelMatching Sample">
1116
<activity
12-
android:name=".MainActivity"
13-
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
14-
android:exported="true"
15-
android:hardwareAccelerated="true"
16-
android:launchMode="singleTop"
17-
android:theme="@style/LaunchTheme"
18-
android:windowSoftInputMode="adjustResize">
17+
android:name=".MainActivity"
18+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
19+
android:exported="true"
20+
android:hardwareAccelerated="true"
21+
android:launchMode="singleTop"
22+
android:theme="@style/LaunchTheme"
23+
android:windowSoftInputMode="adjustResize">
1924
<!-- Specifies an Android theme to apply to this Activity as soon as
2025
the Android process has started. This theme is visible to the user
2126
while the Flutter UI initializes. After that, this theme continues
2227
to determine the Window background behind the Flutter UI. -->
2328
<meta-data
24-
android:name="io.flutter.embedding.android.NormalTheme"
25-
android:resource="@style/NormalTheme" />
29+
android:name="io.flutter.embedding.android.NormalTheme"
30+
android:resource="@style/NormalTheme"/>
2631
<intent-filter>
27-
<action android:name="android.intent.action.MAIN" />
28-
<category android:name="android.intent.category.LAUNCHER" />
32+
<action android:name="android.intent.action.MAIN"/>
33+
<category android:name="android.intent.category.LAUNCHER"/>
2934
</intent-filter>
3035
</activity>
3136
<!-- Don't delete the meta-data below.
3237
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
3338
<meta-data
34-
android:name="flutterEmbedding"
35-
android:value="2" />
39+
android:name="flutterEmbedding"
40+
android:value="2"/>
3641
</application>
3742
</manifest>

example/ios/Podfile.lock

Lines changed: 0 additions & 41 deletions
This file was deleted.

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 1 addition & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
/* Begin PBXBuildFile section */
1010
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
1111
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12-
63E628A9F69D178CE42C70EC /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 443D88A1E247DE49F8981B52 /* Pods_Runner.framework */; };
1312
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
1413
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
1514
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
@@ -32,9 +31,7 @@
3231
/* Begin PBXFileReference section */
3332
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
3433
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
35-
2C0698752E4F6FB2D21E328C /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
3634
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
37-
443D88A1E247DE49F8981B52 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3835
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
3936
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
4037
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
@@ -45,16 +42,13 @@
4542
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
4643
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
4744
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
48-
A6924F6D33196D356E739C1E /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
49-
BC07FF327722D79A6F8FBAB6 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
5045
/* End PBXFileReference section */
5146

5247
/* Begin PBXFrameworksBuildPhase section */
5348
97C146EB1CF9000F007C117D /* Frameworks */ = {
5449
isa = PBXFrameworksBuildPhase;
5550
buildActionMask = 2147483647;
5651
files = (
57-
63E628A9F69D178CE42C70EC /* Pods_Runner.framework in Frameworks */,
5852
);
5953
runOnlyForDeploymentPostprocessing = 0;
6054
};
@@ -79,7 +73,6 @@
7973
97C146F01CF9000F007C117D /* Runner */,
8074
97C146EF1CF9000F007C117D /* Products */,
8175
EAE244DB9C7AEFDC08CBCE19 /* Pods */,
82-
E6341AEC97F546EE6A8D71EC /* Frameworks */,
8376
);
8477
sourceTree = "<group>";
8578
};
@@ -106,20 +99,9 @@
10699
path = Runner;
107100
sourceTree = "<group>";
108101
};
109-
E6341AEC97F546EE6A8D71EC /* Frameworks */ = {
110-
isa = PBXGroup;
111-
children = (
112-
443D88A1E247DE49F8981B52 /* Pods_Runner.framework */,
113-
);
114-
name = Frameworks;
115-
sourceTree = "<group>";
116-
};
117102
EAE244DB9C7AEFDC08CBCE19 /* Pods */ = {
118103
isa = PBXGroup;
119104
children = (
120-
BC07FF327722D79A6F8FBAB6 /* Pods-Runner.debug.xcconfig */,
121-
2C0698752E4F6FB2D21E328C /* Pods-Runner.release.xcconfig */,
122-
A6924F6D33196D356E739C1E /* Pods-Runner.profile.xcconfig */,
123105
);
124106
path = Pods;
125107
sourceTree = "<group>";
@@ -131,14 +113,12 @@
131113
isa = PBXNativeTarget;
132114
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
133115
buildPhases = (
134-
90FECC705C43F7F6A6FD27D8 /* [CP] Check Pods Manifest.lock */,
135116
9740EEB61CF901F6004384FC /* Run Script */,
136117
97C146EA1CF9000F007C117D /* Sources */,
137118
97C146EB1CF9000F007C117D /* Frameworks */,
138119
97C146EC1CF9000F007C117D /* Resources */,
139120
9705A1C41CF9048500538489 /* Embed Frameworks */,
140121
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
141-
96BDD98891F42FFECB1A8391 /* [CP] Embed Pods Frameworks */,
142122
);
143123
buildRules = (
144124
);
@@ -213,45 +193,6 @@
213193
shellPath = /bin/sh;
214194
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n";
215195
};
216-
90FECC705C43F7F6A6FD27D8 /* [CP] Check Pods Manifest.lock */ = {
217-
isa = PBXShellScriptBuildPhase;
218-
buildActionMask = 2147483647;
219-
files = (
220-
);
221-
inputFileListPaths = (
222-
);
223-
inputPaths = (
224-
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
225-
"${PODS_ROOT}/Manifest.lock",
226-
);
227-
name = "[CP] Check Pods Manifest.lock";
228-
outputFileListPaths = (
229-
);
230-
outputPaths = (
231-
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
232-
);
233-
runOnlyForDeploymentPostprocessing = 0;
234-
shellPath = /bin/sh;
235-
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
236-
showEnvVarsInLog = 0;
237-
};
238-
96BDD98891F42FFECB1A8391 /* [CP] Embed Pods Frameworks */ = {
239-
isa = PBXShellScriptBuildPhase;
240-
buildActionMask = 2147483647;
241-
files = (
242-
);
243-
inputFileListPaths = (
244-
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
245-
);
246-
name = "[CP] Embed Pods Frameworks";
247-
outputFileListPaths = (
248-
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
249-
);
250-
runOnlyForDeploymentPostprocessing = 0;
251-
shellPath = /bin/sh;
252-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
253-
showEnvVarsInLog = 0;
254-
};
255196
9740EEB61CF901F6004384FC /* Run Script */ = {
256197
isa = PBXShellScriptBuildPhase;
257198
alwaysOutOfDate = 1;
@@ -265,7 +206,7 @@
265206
);
266207
runOnlyForDeploymentPostprocessing = 0;
267208
shellPath = /bin/sh;
268-
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
209+
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
269210
};
270211
/* End PBXShellScriptBuildPhase section */
271212

0 commit comments

Comments
 (0)