显然,这样做并不理想,因为当编程人员期望执行终止线程时,它可能不执行。
Clearly, this is not ideal because the finalization thread may not execute when the programmer expects.
然而,当并发请求被发送给该页面时,所有线程将正常终止。
However, when concurrent requests are sent to this page, all threads end normally.
如清单1和清单2所示,虽然生成了可接合线程,但是却未将其联接,因此每个终止的可接合线程仍然占用进程空间,泄漏进程内存。
As demonstrated in Listing 1 and 2, joinable threads are produced, but they are never joined, so each terminated joinable thread still occupies the process space, leaking the process memory.
应用推荐