[TYPO3] how to generate link
Elmar Hinz
elmar07 at googlemail.com
Wed Aug 1 16:42:44 CEST 2007
Jan Bednarik wrote:
> Sorry for off topic, but I can't help myself.
>
>> http://t3flyers.wordpress.com/2007/08/01/using-the-typolink-function/
>
> why do you need to create always new tslib_cObject instance?
>
> $cObject = t3lib_div::makeInstance('tslib_cObject');
>
> I don't wonder that Typo3 consumes that much memory. Isn't it better to
> use already created instance (the one from $GLOBALS['TSFE'])?
>
> The best would be to implement Sigleton pattern on some classes in
> makeInstance, but I don't see this happening. So at least, we should use
> every available resource instead of creating new ones.
Absolutly right and in fact expected that suggestion. But I didn't want to
explain the singleton pattern or when and were $cObj is available and where
not. It's good stuff for the comments part of the blog. :-)
Regards
Elmar
More information about the TYPO3-english
mailing list