Project

General

Profile

Actions

Feature #25407

closed

missing method to free getUserObj

Added by Franz Holzinger over 13 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-03-28
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.2
Tags:
Complexity:
Sprint Focus:

Description

When you use t3lib_div::getUserObj('&classname') then the object is stored as peristant.
However on the end of the extension you should also free the used space. There is no method to free the space again. If the extension is called a second time, then the objects are already there. However the objects should be empty.

public static function unsetUserObj($classRef) {
if (isset($GLOBALS['T3_VAR']['getUserObj'][$classRef])) {
unset($GLOBALS['T3_VAR']['getUserObj'][$classRef]);
}
}

(issue imported from #M18052)

Actions #1

Updated by Franz Holzinger over 13 years ago

It is also needed to have a function to only check if there is a persistent object available.

public static function issetUserObj($classRef) {
return isset($GLOBALS['T3_VAR']['getUserObj'][$classRef]);
}
Actions #2

Updated by Mathias Schreiber almost 10 years ago

  • Description updated (diff)
  • Target version changed from 0 to 7.4 (Backend)
Actions #3

Updated by Susanne Moog over 9 years ago

  • Target version changed from 7.4 (Backend) to 7.5
Actions #4

Updated by Benni Mack about 9 years ago

  • Target version deleted (7.5)
Actions #5

Updated by Benni Mack over 7 years ago

  • Status changed from New to Closed

This is now solved conceptually with 9.0 where getUserObj does not do a custom storage of reference objects but the SingletonInterface is used instead where the implementation can choose to do whatever is wanted.

Actions

Also available in: Atom PDF