Keeping a reference instead of a pointer?
<p>I have a class which basically is a text manager. It can draw text and whatnot. I basically want the color and text std::string to only be a constant reference. Would it then be alright to do</p>

<pre><code>class TextManager {
const std::string &amp;text;
void draw(const std::string &amp;text) const;
public:
TextManager(const std::string &amp;text)
{
  this-&gt;text = text;
}

void someMethod()
{
   draw(text);
}


};
</code></pre>

<p>I want when the class that owns an instance of TextManager's text changes, the change is reflected in the TextManager.</p>

<p>would I be better off using a pointer?
thanks</p>
