Это старая версия документа.



Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/users/p/prom-auto/domains/prom-auto.ru/wiki/inc/parser/handler.php on line 1458

Warning: Declaration of syntax_plugin_tablecalc::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /home/users/p/prom-auto/domains/prom-auto.ru/wiki/lib/plugins/tablecalc/syntax.php on line 41

Warning: Declaration of syntax_plugin_tablecalc::render($mode, &$renderer, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /home/users/p/prom-auto/domains/prom-auto.ru/wiki/lib/plugins/tablecalc/syntax.php on line 72

Warning: Declaration of syntax_plugin_offline::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /home/users/p/prom-auto/domains/prom-auto.ru/wiki/lib/plugins/offline/syntax.php on line 60

Warning: Declaration of syntax_plugin_offline::render($format, &$renderer, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /home/users/p/prom-auto/domains/prom-auto.ru/wiki/lib/plugins/offline/syntax.php on line 67

Warning: preg_match(): Compilation failed: invalid range in character class at offset 3416 in /home/users/p/prom-auto/domains/prom-auto.ru/wiki/inc/parser/lexer.php on line 118
A PCRE internal error occured. This might be caused by a faulty plugin

====== Weak Referencies ====== <code java> class TheStrong { public Object link; public Object getLink(){ return link; } public void print(Object newlink){ link = newlink; System.out.println("TheStrong: my link =" + getLink()); } } class TheWeak { public WeakReference<Object> link; public Object getLink(){ return link.get(); } public void print(Object newlink){ link = new WeakReference<>( newlink ); System.out.println("TheWeak: my link =" + getLink()); } } public class Test { public static void main(String[] args) throws IOException { TheWeak a1 = new TheWeak(); a1.print(Arrays.asList(1,2,3)); TheStrong b1 = new TheStrong(); b1.print(Arrays.asList(4,5,6)); Runtime r = Runtime.getRuntime(); r.gc(); System.out.println("TheWeak: its link=" + a1.link.get()); System.out.println("TheStrong: its link=" + b1.link); } } </code>

dev/java/lang/weakrefs.1344091338.txt.gz · Последние изменения: 2012/08/04 18:42 — jamis7005
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0