ããã¯ã©ã¹ã®ãªãã¸ã§ã¯ãï¼ã¤ã³ã¹ã¿ã³ã¹ï¼ãã²ã¨ã¤ã«éå®ãããå ´åã®ããã°ã©ã è¨è¨æ¹æ³ã¨ãã¦ãã·ã³ã°ã«ãã³ãã¿ã¼ã³ (singleton pattern) ã¨ããè¨è¨ãã¿ã¼ã³ãããã¾ãã ããã§ã¯ JavaScript ã§ã·ã³ã°ã«ãã³ãå®è£ ããæ¹æ³ã示ãã¾ãã C# ã Java ã§ã®ã·ã³ã°ã«ãã³ã®å®è£ æ¹æ³ C# ãªã©ã® class ãã¼ã¯ã¼ãã§ã¯ã©ã¹ãå®ç¾©ããè¨èªã®å ´åãã·ã³ã°ã«ãã³ãå®è£ ããå ´åã®åºæ¬çãªæ¹æ³ã¯æ¬¡ã®ãããªãã®ã§ãã ã¾ãã³ã³ã¹ãã©ã¯ã¿ãç´æ¥å¼ã¹ãªãããã« (new ã§ããªãããã«)ãã³ã³ã¹ãã©ã¯ã¿ã private ã«ãã¾ãã次ã«ã å¯ä¸ä½æãããã¤ã³ã¹ã¿ã³ã¹ãä¿æãã static å¤æ°ãå®ç¾©ããããã«ã¤ã³ã¹ã¿ã³ã¹ãã»ãããã¤ã³ã¹ã¿ã³ã¹ãåå¾ãã (static) ã¡ã½ããã§ã ãã®ã¤ã³ã¹ã¿ã³ã¹ãè¿ãã åºæ¬çãªèãæ¹ã¯ãããããã®ã§ããJava ã C++ ãªã©ã§ãå
{{#tags}}- {{label}}
{{/tags}}