When passing pointers to a class, who should manage the resources?
<p>I'm creating a gui api for games. I have for example a font for each widget in the form of a Font* . Right now I have it so that I do not ever manage the memory of these (for obvious reasons) because I think the user can use smart pointers if they want this memory managed. The con to this is that it is not very idiot proof. If a user set the font like this:</p>

<pre><code>obj.setFont(new Font(""));
</code></pre>

<p>This would immediately cause a memory leak because no one ever frees it. The only way would be to delete getFont();</p>

<p>Would it be instead better for me to manage these?</p>

<p>Thanks</p>
