提交 24cedf24 authored 作者: Frederic's avatar Frederic

Keep the reference to keep the test sensible.

上级 246b53b2
...@@ -206,8 +206,9 @@ if run_memory_usage_tests: ...@@ -206,8 +206,9 @@ if run_memory_usage_tests:
for i in xrange(1000000): for i in xrange(1000000):
n = numpy.asarray([2.3, 4.5], dtype='f') n = numpy.asarray([2.3, 4.5], dtype='f')
c = sys.getrefcount(n) c = sys.getrefcount(n)
cuda.CudaNdarray(n) a = cuda.CudaNdarray(n)
assert c == sys.getrefcount(n) assert c == sys.getrefcount(n)
del a
if not i % 1000: if not i % 1000:
print '.', print '.',
print gc.collect(), print gc.collect(),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论