src/blitter/factory.hpp
changeset 9294 8e74039d3ca0
parent 9111 48ce04029fe4
child 9436 2eabc2c8ac08
equal deleted inserted replaced
9293:96e818608056 9294:8e74039d3ca0
    54 public:
    54 public:
    55 	BlitterFactoryBase() :
    55 	BlitterFactoryBase() :
    56 		name(NULL)
    56 		name(NULL)
    57 	{}
    57 	{}
    58 
    58 
    59 	virtual ~BlitterFactoryBase() { if (this->name != NULL) GetBlitters().erase(this->name); free(this->name); }
    59 	virtual ~BlitterFactoryBase()
       
    60 	{
       
    61 		if (this->name == NULL) return;
       
    62 		GetBlitters().erase(this->name);
       
    63 		if (GetBlitters().empty()) delete &GetBlitters();
       
    64 		free(this->name);
       
    65 	}
    60 
    66 
    61 	/**
    67 	/**
    62 	 * Find the requested blitter and return his class.
    68 	 * Find the requested blitter and return his class.
    63 	 * @param name the blitter to select.
    69 	 * @param name the blitter to select.
    64 	 * @post Sets the blitter so GetCurrentBlitter() returns it too.
    70 	 * @post Sets the blitter so GetCurrentBlitter() returns it too.