fromarray_bug.py
1 | """OpenCv - numpy memory leak test script
|
---|---|
2 | """
|
3 | |
4 | import cv |
5 | import numpy |
6 | |
7 | def nd(): |
8 | while True: |
9 | a = numpy.ones((1,1,3)) |
10 | mat = cv.fromarray(a, allowND=True)
|
11 | |
12 | def no_nd(): |
13 | while True: |
14 | a = numpy.ones((1,1,3)) |
15 | mat = cv.fromarray(a, allowND=False)
|
16 | |
17 | if __name__ == '__main__': |
18 | nd() |
19 | #no_nd() |