Skip to content

Commit

Permalink
fixed memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
nalbion committed May 9, 2023
1 parent fb1dfaf commit cbf3552
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import kotlin.reflect.KFunction1
import kotlin.reflect.KMutableProperty0


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

init {
application.messageBus.connect(this).subscribe(AiResponseListener.AI_RESPONSE_TOPIC, this)
application.messageBus.connect().subscribe(AiResponseListener.AI_RESPONSE_TOPIC, this)

initialiseLogPane()

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

override fun dispose() {
}

// override fun dispose() {
// }

fun createToolBar(): JComponent {
// val group = DefaultActionGroup()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import javax.swing.JTextPane


class SpeechLogTab(private val toolWindow: ToolWindow) :
Disposable,
// Disposable,
// DumbAware,
NlpResultListener
{
Expand All @@ -34,7 +34,7 @@ class SpeechLogTab(private val toolWindow: ToolWindow) :


init {
application.messageBus.connect(this).subscribe(NlpResultListener.NLP_RESULT_TOPIC, this)
application.messageBus.connect().subscribe(NlpResultListener.NLP_RESULT_TOPIC, this)

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

override fun dispose() {
}
// override fun dispose() {
// }

fun createComponent(): JComponent {
val manualEntry = JBTextField(20)
Expand Down

0 comments on commit cbf3552

Please sign in to comment.