~robertcarr/unity/rightalign-filter

« back to all changes in this revision

Viewing changes to plugins/unityshell/src/ResultRenderer.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:
 
1
// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
1
2
/*
2
3
 * Copyright 2011 Canonical Ltd.
3
4
 *
27
28
{
28
29
namespace dash
29
30
{
 
31
NUX_IMPLEMENT_OBJECT_TYPE(ResultRenderer);
30
32
 
31
33
ResultRenderer::ResultRenderer(NUX_FILE_LINE_DECL)
32
 
  : Object(false, NUX_FILE_LINE_PARAM),
33
 
    width(50),
34
 
    height(50)
 
34
  : InitiallyUnownedObject(NUX_FILE_LINE_PARAM)
 
35
  , width(50)
 
36
  , height(50)
35
37
{
36
38
}
37
39