If I need to select a static method and instantiate and use the instance method, I will always become static methods. but what are the detailed costs of instantiating?
For example, I saw a DAL that can be done with static classes, but they decided to make it an instance in the BLL with every call that they call something like.
new Customer (). GetData ();
how bad can it be?
thank
. - , 500 000 1,5 .
, , new Customer().GetData(); BLL, .
new Customer().GetData();
, , new Customer().GetData();: Customer , - , CustomerReader (- ). , Customer , , GetData - , .
Customer
CustomerReader
GetData
CLR. (- - GC). GC ( ), , GC, . , .
, ( ) , (, / ),
- new Customer().GetData(); - , .
Source: https://habr.com/ru/post/1742277/More articles:Game Development VB6 - vb6Firebug profiling issue: "no activity for profile" - javascriptUsing sphinx to create html context sensitive help - pythonmod rewrite, headers and htaccess - phpC ++ BigInt Multiple Multiplication Concept - c ++Subversion: changing the target repo of the working directory - svnRecover only modified files with duplication - backupSilverlight Debugging, Missing List Item - .net% style macros are not supported on some property pages of a C ++ / CLI project under VS2010? - macrosHow do I tell Visual Studio 2010 that the Search dialog box has been saved? - replaceAll Articles