Skip to content

Commit cbf3552

Browse files
committed
fixed memory leaks
1 parent fb1dfaf commit cbf3552

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

src/main/java/org/openasr/idiolect/presentation/toolwindow/chat/ChatTab.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import kotlin.reflect.KFunction1
3232
import kotlin.reflect.KMutableProperty0
3333

3434

35-
class ChatTab(private val toolWindow: ToolWindow) : Disposable, AncestorListener, AiResponseListener {
35+
class ChatTab(private val toolWindow: ToolWindow) : AncestorListener, AiResponseListener {
3636
private val log = logger<ChatTab>()
3737
private val maxLength = 100
3838
private val conversationLog = mutableListOf<String>()
@@ -46,7 +46,7 @@ class ChatTab(private val toolWindow: ToolWindow) : Disposable, AncestorListener
4646
private val aiService = service<AiService>()
4747

4848
init {
49-
application.messageBus.connect(this).subscribe(AiResponseListener.AI_RESPONSE_TOPIC, this)
49+
application.messageBus.connect().subscribe(AiResponseListener.AI_RESPONSE_TOPIC, this)
5050

5151
initialiseLogPane()
5252

@@ -56,9 +56,8 @@ class ChatTab(private val toolWindow: ToolWindow) : Disposable, AncestorListener
5656
updateModels()
5757
}
5858

59-
override fun dispose() {
60-
}
61-
59+
// override fun dispose() {
60+
// }
6261

6362
fun createToolBar(): JComponent {
6463
// val group = DefaultActionGroup()

src/main/java/org/openasr/idiolect/presentation/toolwindow/log/SpeechLogTab.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import javax.swing.JTextPane
2323

2424

2525
class SpeechLogTab(private val toolWindow: ToolWindow) :
26-
Disposable,
26+
// Disposable,
2727
// DumbAware,
2828
NlpResultListener
2929
{
@@ -34,7 +34,7 @@ class SpeechLogTab(private val toolWindow: ToolWindow) :
3434

3535

3636
init {
37-
application.messageBus.connect(this).subscribe(NlpResultListener.NLP_RESULT_TOPIC, this)
37+
application.messageBus.connect().subscribe(NlpResultListener.NLP_RESULT_TOPIC, this)
3838

3939
// logPane.contentType = UIUtil.HTML_MIME
4040
logPane.isEditable = false
@@ -46,8 +46,8 @@ class SpeechLogTab(private val toolWindow: ToolWindow) :
4646
".message {color: yellow; margin: 0 0 0 20px;} ")
4747
}
4848

49-
override fun dispose() {
50-
}
49+
// override fun dispose() {
50+
// }
5151

5252
fun createComponent(): JComponent {
5353
val manualEntry = JBTextField(20)

0 commit comments

Comments
 (0)