# Permanent data in a stable memory, not really permanent

**URL:** <https://forum.dfinity.org/t/permanent-data-in-a-stable-memory-not-really-permanent/30098>\
**Category:** Language Support\
**Created:** [April 28, 2024, 1:12pm UTC](https://forum.dfinity.org/t/permanent-data-in-a-stable-memory-not-really-permanent/30098 "2024-04-28T13:12:43Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![icme](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/icme/32/4327_2.png) [@icme](https://forum.dfinity.org/u/icme)\
**Post date:** [April 28, 2024, 8:27pm UTC](https://forum.dfinity.org/t/permanent-data-in-a-stable-memory-not-really-permanent/30098/4 "2024-04-28T20:27:51Z")

</div>

There are plenty of stable data structure collections that have been developed by the community.

Here’s a few that I’d recommend, all that use [MOPS - on-chain package manager for Motoko!](https://forum.dfinity.org/t/mops-on-chain-package-manager-for-motoko/17275) for easy 3rd-party Motoko library integration.

In general, I’d recommend heap-based stable collections over ones that directly manipulate stable memory since the Motoko team is currently working on improvements to the language and compiler that will provide a “stable heap” on top of the DFINITY foundation’s current work to bring wasm64 to canisters.

Here are a few data structures you might use often/find helpful:

- [Stable Hashmap](https://mops.one/map)
- [Stable BTree](https://mops.one/stableheapbtreemap) (Written by me 🙂 )
- [Stable Vector (i.e. Buffer)](https://mops.one/vector)

You can find tons of Motoko packages at [https://mops.one/](https://mops.one/)

Btw, a few years ago, I had a similar question to you and asked it here → [Clarification on Stable Types with Examples](https://forum.dfinity.org/t/clarification-on-stable-types-with-examples/11075). That thread has some information on how you can write your own stable collection if you’re at all interested.

---

_[View the full topic](https://forum.dfinity.org/t/permanent-data-in-a-stable-memory-not-really-permanent/30098)._
