~robertcarr/unity/rightalign-filter

« back to all changes in this revision

Viewing changes to plugins/unityshell/src/unityshell.cpp

  • Committer: Neil Jagdish Patel
  • Author(s): Tim Penhey
  • Date: 2011-09-05 14:57:56 UTC
  • mfrom: (1468.2.14 texture-from-bitmap)
  • Revision ID: neil.patel@canonical.com-20110905145756-m5vnc7jumubxtp04
I noticed that quite a few of the memory leaks were do to
making a texture from a CairoGraphics object. Instead of having
to remember at all the call sites, I've created a couple of helper
methods.

I had to control myself a lot during this change to not change too
many other things at once. Sometimes I couldn't help myself though.

In particular I changed the TextureContainer to use smart pointers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1943
1943
 
1944
1944
  self->AddChild(self->launcher);
1945
1945
 
1946
 
  nux::HLayout* layout = new nux::HLayout();
 
1946
  nux::HLayout* layout = new nux::HLayout(NUX_TRACKER_LOCATION);
1947
1947
  layout->AddView(self->launcher, 1);
1948
1948
  layout->SetContentDistribution(nux::eStackLeft);
1949
1949
  layout->SetVerticalExternalMargin(0);