Flushing rules is clearly an important part of creating themes with custom post types. See here and here.
Does anyone have any example code of how to flush rules from functions.php?
I'm a little surprised this isn't covered in the custom post type pages of the Codex.
Update: I tried adding this to functions.php, but it didn't work:
register_deactivation_hook( __FILE__, array(&$this,'deactivate' ) );
function deactivate() {
global $wp_rewrite;
$wp_rewrite->flush_rules();
}