aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2020-05-06 23:30:16 +0300
committerTulir Asokan <tulir@maunium.net>2020-05-06 23:30:16 +0300
commit03826346d9bbe44f32e868e18d0367949b518361 (patch)
treee7767f8d24336ab121691d677f78fdbb714bf1ff /ui
parent6cf22290ad6a471fa7556ad84d5c70862fa7726c (diff)
Random changes
Diffstat (limited to 'ui')
-rw-r--r--ui/commands.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/commands.go b/ui/commands.go
index 4dd1482..02d2a3d 100644
--- a/ui/commands.go
+++ b/ui/commands.go
@@ -263,8 +263,10 @@ func cmdRoomNick(cmd *Command) {
}
func cmdHeapProfile(cmd *Command) {
- runtime.GC()
- dbg.FreeOSMemory()
+ if len(cmd.Args) == 0 || cmd.Args[0] != "nogc" {
+ runtime.GC()
+ dbg.FreeOSMemory()
+ }
memProfile, err := os.Create("gomuks.heap.prof")
if err != nil {
debug.Print("Failed to open gomuks.heap.prof:", err)