Building a Memory-Safe Clipboard Manager for Mac

Clipboard managers are deceptively simple on the surface: watch the system clipboard, store what gets copied, let the user paste from history. But under the hood, clipboard management on macOS presents a serious engineering challenge — especially around memory.

A single screenshot on a Retina display can be 20–40 MB of raw bitmap data. Copy a few images, and a naive clipboard manager can silently balloon to gigabytes of RAM. DockMaster's clipboard history is designed from the ground up to be memory-safe, fast, and privacy-conscious.

The Memory Problem

When you press Cmd+C on an image, macOS places the full-resolution bitmap on the pasteboard. Most clipboard managers store this data directly — either in memory or on disk. Over a work session, this adds up fast:

  • A 5K screenshot: ~40 MB uncompressed
  • A Figma frame export: ~15–25 MB
  • A photo from Preview: ~20 MB
  • 10 screenshots in an hour: ~200–400 MB

Without careful management, clipboard history becomes one of the largest memory consumers on your Mac — often without you realizing it.

CoreImage Downsampling Pipeline

DockMaster processes every image that enters the clipboard through a CoreImage downsampling pipeline. Instead of storing the full-resolution bitmap, DockMaster:

  • Captures the image from the pasteboard at its original resolution.
  • Generates a thumbnail using CoreImage's hardware-accelerated CIFilter pipeline, targeting a maximum dimension suitable for preview display.
  • Compresses the thumbnail to JPEG at a quality level that balances visual fidelity with storage size.
  • Discards the original full-resolution bitmap immediately.

The result: a 40 MB screenshot becomes a ~200 KB thumbnail in clipboard history. You can still see what you copied, and pasting from history gives you the downsampled version — which is sufficient for most paste-from-history use cases (Slack messages, emails, documentation).

The 50 MB Cache Limit

DockMaster enforces a hard 50 MB ceiling on total clipboard history storage. When the cache approaches this limit, the oldest entries are evicted first. This policy means DockMaster's clipboard feature never contributes meaningfully to system memory pressure, regardless of how long your session lasts.

Text entries are tiny (usually bytes to kilobytes), so in practice the 50 MB limit accommodates hundreds of text clips and dozens of image thumbnails simultaneously.

Sensitive Content Masking

Clipboard managers have a privacy problem: they capture everything you copy, including passwords, one-time passwords (OTPs), credit card numbers, and API keys. DockMaster addresses this with automatic sensitive content detection:

  • Password manager integration — entries from known password managers (1Password, Bitwarden, macOS Keychain) are detected and masked in the clipboard history UI.
  • OTP detection — short numeric strings that match OTP patterns are flagged and auto-expire from history after 60 seconds.
  • Concealed fields — macOS marks certain pasteboard entries as "concealed" (password fields). DockMaster respects this flag and never displays the content in plain text.

Free vs Pro

The free version of DockMaster includes clipboard history with a limited number of entries. Pro (£14.99, one-time) unlocks unlimited history within the 50 MB cache, pinned clips, and sensitive content masking. The clipboard manager is always accessible via Option+C — a keyboard shortcut that opens the clipboard panel instantly from any app.

Local-Only Processing

Everything happens on your Mac. Clipboard data is never transmitted over the network, stored in the cloud, or analyzed by external services. DockMaster has no server component and works fully offline. Your clipboard history is your business — it stays on your machine and is cleared when you close the app or manually purge it.

Get Started

Download DockMaster and press Option+C to open clipboard history from any app. The free tier gives you a taste — upgrade to Pro for the full memory-safe, privacy-first clipboard experience.

Download DockMaster

Version 6.2 · Requires macOS 14 Sonoma or later · Free to start, Pro for the full experience.

DockMaster-Pro.dmg · Version 6.2 · £14.99 for Pro · ≈ $19 USD / €18 EUR / ¥135 CNY