How does encapsulation prevent sharing?
A Bitmap class can be used to encapsulate a bitmap/texture resource and then you just load/create an instance and then hand it to the object that will be doing the rendering. When you're done with it you destroy the object to free the resource.
Also, most real-world codebases are measured using the scientific unit "wtfs-per-minute".
Show differencesHistory of post edits
#ActualKhatharr
Posted 26 December 2012 - 09:16 PM
#3Khatharr
Posted 26 December 2012 - 09:14 PM
How does encapsulation prevent sharing?
A Bitmap class can be used to encapsulate a bitmap/texture resource and then you just load/create an instance and then hand it to the object that will be doing the rendering. When you're done with it you destroy the object to free the resource.
Also, according to XKCD, most real-world codebases are measured using the scientific unit "wtfs-per-minute".
A Bitmap class can be used to encapsulate a bitmap/texture resource and then you just load/create an instance and then hand it to the object that will be doing the rendering. When you're done with it you destroy the object to free the resource.
Also, according to XKCD, most real-world codebases are measured using the scientific unit "wtfs-per-minute".
#2Khatharr
Posted 26 December 2012 - 09:14 PM
<p>How does encapsulation prevent sharing?</p>
<p> </p>
<p>A Bitmap class can be used to encapsulate a bitmap/texture resource and then you just load/create an instance and then hand it to the object that will be doing the rendering. When you're done with it you destroy the object to free the resource.</p>
<p> </p>
<p>Also, according to XKCD, most real-world codebases are measured using the scientific unit "wtfs-per-minute".</p>
<p> </p>
<p>A Bitmap class can be used to encapsulate a bitmap/texture resource and then you just load/create an instance and then hand it to the object that will be doing the rendering. When you're done with it you destroy the object to free the resource.</p>
<p> </p>
<p>Also, according to XKCD, most real-world codebases are measured using the scientific unit "wtfs-per-minute".</p>