---
title: "Creating, copying, and disposing of atom containers"
framework: QuickTime File Format
role: collectionGroup
path: quicktime-file-format/creating_copying_and_disposing_of_atom_containers
---

# Creating, copying, and disposing of atom containers

Manage atoms in atom containers.

## Overview

Overview Before you can add atoms to an atom container, you must first create the container by calling QTNewAtomContainer. The code sample shown in the following calls QTNewAtomContainer to create an atom container. QTAtomContainer spriteData; OSErr err // Create an atom container to hold a sprite’s data. err=QTNewAtomContainer (&spriteData); When you have finished using an atom container, dispose of it by calling the QTDisposeAtomContainer function. The sample code shown in the following listing calls QTDisposeAtomContainer to dispose of the spriteData atom container. if (spriteData)     QTDisposeAtomContainer (spriteData);

## Topics

### Managing atoms

- [Creating new atoms](quicktime-file-format/creating_new_atoms.md)
- [Copying existing atoms](quicktime-file-format/copying_existing_atoms.md)
- [Retrieving atoms from an atom container](quicktime-file-format/retrieving_atoms_from_an_atom_container.md)
- [Modifying atoms](quicktime-file-format/modifying_atoms.md)
- [Removing atoms from an atom container](quicktime-file-format/removing_atoms_from_an_atom_container.md)

## See Also

### Building in QuickTime

- [Atoms](quicktime-file-format/atoms.md)
- [QT atoms and atom containers](quicktime-file-format/qt_atoms_and_atom_containers.md)
- [QuickTime movie files](quicktime-file-format/quicktime_movie_files.md)
