Article View: cn.bbs.comp.lang.java
Article #24595Re: chat room
From: pc
Date: Wed, 07 Jan 1998 00:00
Date: Wed, 07 Jan 1998 00:00
33 lines
2424 bytes
2424 bytes
<pre>
stop()����Ӧ�û᳹�Ľ����thread����java�Զ����
��ռ�õ���Դ��
��destroy()�������������ƻ�һ��thread��ִ�У�����û��
�κ�����Ķ���������ס����Դ���ᱻ�ͷš�
</pre>
�� �� jwolf (����˭) �Ĵ������ᵽ: ��
: �������˵�ú��������run�����е�ѭ�����е�������:
: clockthread==mythread(Ҳ���ǵ�ǰ���߳�),����stop()������
: ʹclockthread=null��Ҳ����˵����ˢ�»��뿪���ҳ��ʱ��
: Browser����stop()������ʹclockthread=null,�Ӷ�run�е�ѭ��
: ����Ӷ�run()������߳̽���
: �������û�лش�ղŵ����⣬Ҳ���ǣ�stop()������
: �߳�ֹͣ��û�и����ã���ijЩ�ڴ�û�����?�߳�������Ķ�
: ����������ͷţ�destroy()����������ʲô�á��̵߳Ľ���
: һ����ζ�������õ��ڴ��ͷų����ˡ�
: �ȷ�˵��
: class SubThread extends Thread{
: Object object1;
: ...
: public void Run(){
: ...
: }
: ...
: }
: ����һ��Thread �����࣬�������н��������ռ���ڴ�
: �ͷų����������е�Object1��������̵߳�ֹͣ���ڴ��ͷ�
: Ӧ���������°�?�Ҿ���java���ڵ�û�б���ָ��һ������ʱ,����
: ���ͷ����������ռ���ڴ档
--
[1;36m ��Դ: ����������BBSվ��bbs.nease.net�E[FROM: www-post@bbs.nease.n]
Technical Details
Message-ID:
<3MQYJY$6yh@bbs.nease.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB X-Google-Thread: f6cb0,46b4f2a2f397d037 X-Google-Attributes: gidf6cb0,public From: Peterc.bbs@bbs.nease.net (pc) Subject: Re: chat room Date: 1998/01/07 Message-ID: <3MQYJY$6yh@bbs.nease.net> X-Deja-AN: 313532191 X-Filename: Java/M.884151730.A Organization: Net Ease Newsgroups: cn.bbs.comp.lang.java,