hannesm / jackline

minimalistic secure XMPP client in OCaml
BSD 2-Clause "Simplified" License
250 stars 20 forks source link

Feature: Clear all read messages / clear all read messages from offline contacts #141

Open cfcs opened 7 years ago

cfcs commented 7 years ago

Feature: Clear all read messages / clear all read messages from offline contacts

It would be nice to have a /clearall command.

Having to manually navigate to each offline contact after a conversation and /clear gets cumbersome. Without doing this, messages linger in memory forever.

Thoughts?

hannesm commented 7 years ago

sure, PR welcome

sizuz commented 7 years ago

Any ideas how long the messages stay in memory when you do /clear? Does ocaml expose anything to securely erase memory/securely erase an object from memory when it is destroyed?

hannesm commented 7 years ago

@sizuz there is no secure erase, and since it is a memory managed language this requires cooperation from the runtime system (esp. the garbage collector), to also wipe memory where the data lived before. it is definitively a feature I'd like to have in OCaml, but we're not there yet.

cfcs commented 7 years ago

@sizuz as hannes said, it does not. Could be implemented in the runtime, turned on by a compile-time option. Intuitively it seems to me like it would be pretty simple to add a patch to do this.