perl – “Scalars泄露:1”是什么意思?

前端之家收集整理的这篇文章主要介绍了perl – “Scalars泄露:1”是什么意思?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我刚刚收到警告“ Scalars泄露:1次”9次.

我猜它来自一个线程上传程序,它使用9个线程与模块线程,threads :: shared和Thread :: Queue.这是在WinXP,活动状态5.8.8.

知道这意味着什么吗?这个程序运行了一段时间没有这样的警告,我用相同的(轻)工作重新启动程序,导致警告,但这次没有警告.

我不是在编译时尝试启动线程,除非这是Thread :: Queue在内部执行的操作.我的第一个线程调用是在Getopt :: Long处理之后.

解决方法

From this website:

Scalars leaked: 1 Yikes! What is that! “Scalars leaked: 1”. Well,yes,that’s one of the remaining problems/features/bugs of the Perl ithreads implementation. This particularly seems to happen when you start threads at compile time. From practical experience,I must say it seems to be pretty harmless. And compared to all of the other “leaking” of memory that happen because data-structures are copied,a single leaked scalar is presumably not a lot. And the error message is probably in error in this case anyway.”

猜你在找的Perl相关文章