The Zend site has published part three of their "Extension Writing" tutorials, this time focusing on the management of resources in your extensions.
Up until now, you've worked with concepts that are familiar and map easily to userspace analogies. In this tutorial, you'll dig into the inner workings of a more alien data type - completely opaque in userspace, but with behavior that should ultimately inspire a sense of deja vu.
They start things off by describing what resources are in the Zend Engine, initializing your resources, using them, and destroying them. They mention different kinds of resources, including normal and persistent resources. There's code for each step of the way, including a sanity check at the end.