Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

php - What is the point of nulling private variables in destructor? -


i have spot following pattern in code i'm working with: in classes in destructor have found private variable being nulled, in example:

public function __destruct() {     foreach($this->observers $observer)     {         $observer = null;     }     $this->db_build = null; } 

is there point in doing when php has gc? somehow improve performance of script?

it could because php's garbage collection based on reference countring, , older versions not handle cyclical dependencies. then, in cases have been necessary manually set references null enable gc work, , there may still special cases cycle detection algorithm not catch.

more though, it's example of cargo cult programming (the wikipedia entry explicitly lists example).


Comments

Popular posts from this blog

ios - Very simple iPhone App crashes on UILabel settext -

mysql - Why there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT clause? -

c# - Usage of Server Side Controls in MVC Frame work -