forked from php/doc-ja
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresource.xml
70 lines (61 loc) · 2.42 KB
/
resource.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 95bdd6883b5dde9504701777ba81b3c5f15df52b Maintainer: takagi Status: ready -->
<!-- CREDITS: hirokawa,shimooka,mumumu -->
<sect1 xml:id="language.types.resource">
<title>リソース</title>
<para>
&resource; は特別な変数であり、外部リソースへのリファレンスを保持しています。
リソースは、特別な関数により作成され、使用されます。
これらの関数および対応する全ての &resource; 型の一覧については、
<link linkend="resource">付録</link> を参照ください。
</para>
<para>
<function>get_resource_type</function> も参照ください。
</para>
<sect2 xml:id="language.types.resource.casting">
<title>リソースへの変換</title>
<para>
&resource; 型は、オープンされたファイル、データベース接続、
イメージキャンバスエリアのような特殊なハンドルを保持するため、
他の値を &resource; に変換することはできません。
</para>
</sect2>
<sect2 xml:id="language.types.resource.self-destruct">
<title>リソースの開放</title>
<para>
Zend エンジンの一部であるリファレンスカウンティングシステムのおかげで、
ある &resource; がもう参照されなくなった場合に (Java と全く同様に)、
そのリソースは自動的に削除されます。この場合、このリソースが作成した
全てのリソースは、ガベージコレクタにより開放されます。
このため、free_result 関数を用いて手動でメモリを開放する必要が生じるのはまれです。
</para>
<note>
<simpara>
持続的データベース接続は特別で、ガベージコレクタにより破棄されません。
<link linkend="features.persistent-connections">持続的接続</link>
も参照ください。
</simpara>
</note>
</sect2>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->