As you've seen you can't reuse the existing dompdf instance. Once a render has been done there's a lot of internal objects created that dompdf currently doesn't have a method of removing.
But that's not to say you can't render more than one document. You'll just have to re-instantiate dompdf. Typically you would do something like the following:
foreach ($htmldocs as $index => $html) {
$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->render();
$output = $dompdf->output();
file_put_contents($index . '.pdf', $output);
unset($dompdf);
}
I've found in the past that you can achieve better performance by isolating the dompdf rendering component to a separate script and spawning a new process to perform the render. So your foreach would be something like:
foreach ($htmldocs as $index => $html) {
file_put_contents($index . '.html', $html);
exec('php dompdf.php ' . $index . '.html');
}
And dompdf.php would be something like:
$dompdf = new DOMPDF();
$dompdf->load_html_file($argv[1]);
$dompdf->render();
file_put_contents(str_replace('.html', '.pdf', $argv[1]), $dompdf->output());
How you accomplish this in Codeigniter depends on your implementation. You're referencing a class property (from the controller instance, perhaps?) so I suspect you may have to rewrite things a bit. If you add more of your implementation details we can guide you further.