Cleanup memory a bit better in some cases.
Artur Bergman [Wed, 1 May 2002 19:15:26 +0000 (19:15 +0000)]
p4raw-id: //depot/perl@16314

ext/threads/threads.xs

index 2c1f2a5..2ebbd83 100755 (executable)
@@ -515,6 +515,7 @@ Perl_ithread_join(pTHX_ SV *obj)
        /* We have finished with it */
        thread->state |= PERL_ITHR_JOINED;
        MUTEX_UNLOCK(&thread->mutex);
+       sv_unmagic(SvRV(obj),PERL_MAGIC_shared_scalar);
        return retparam;
     }
     return (AV*)NULL;