You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ImagingTests/ImagingLeakTests.cs
+21-1Lines changed: 21 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,28 @@
1
-
usingSystem.Drawing;
1
+
/*
2
+
* COPYRIGHT: See COPYING in the top level directory
3
+
* PROJECT: ImagingTests
4
+
* FILE: ImagingLeakTests.cs
5
+
* PURPOSE: Search for leaks in the ImagingFacade methods by running them multiple times and monitoring memory usage. This is a very basic test and should be used as a starting point for more comprehensive leak detection.
6
+
* Should be run in a loop or with a profiler for best results, as small leaks might not be detected in a single run.
7
+
* More calls will amplify the leak if it exists, but be mindful of test execution time.
8
+
* Should be extended in the future to cover more methods and scenarios, especially those involving unmanaged resources.
9
+
* PROGRAMER: Peter Geinitz (Wayfarer)
10
+
*/
11
+
12
+
usingSystem.Drawing;
2
13
usingImaging;
3
14
4
15
namespaceImagingTests
5
16
{
17
+
/// <summary>
18
+
/// Simple Memory checker for the ImagingFacade methods. It runs the method multiple times and checks if the memory usage increased significantly, which would indicate a leak.
19
+
/// </summary>
6
20
[TestClass]
7
21
publicclassImagingLeakTests
8
22
{
23
+
/// <summary>
24
+
/// Tests the pixelate for memory leaks.
25
+
/// </summary>
9
26
[TestMethod]
10
27
publicvoidTestPixelateForMemoryLeaks()
11
28
{
@@ -28,6 +45,9 @@ public void TestPixelateForMemoryLeaks()
0 commit comments