Template:Leaking Nasal disclaimer: Difference between revisions
Jump to navigation
Jump to search
m (Johan G moved page Template:Leaking Nasal Disclaimer to Template:Leaking Nasal disclaimer: Non-camel case title) |
m (Meant for use within a section) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{caution|'''Improper use''' of the <code>{{{oldapi|foo}}}</code> API may cause '''resource leaks'''. | {{caution|'''Improper use''' of the <code>{{{oldapi|foo()}}}</code> API may cause '''resource leaks'''. | ||
This typically is caused by the low-level nature of such code, requiring manual tracking of [[Using listeners and signals with Nasal|listeners]] and [[Nasal Loops#settimer loops|timers]] and manual [[Reset & re-init|reset and re-init handling]]. | This typically is caused by the low-level nature of such code, requiring manual tracking of [[Using listeners and signals with Nasal|listeners]] and [[Nasal Loops#settimer loops|timers]] and manual [[Reset & re-init|reset and re-init handling]]. | ||
It is '''instead recommended''' that you use the <code>{{{newapi|bar}}}</code> API. Alternatively a wrapping helper class can be used to handle low-level APIs, which is the recommended way to support multiple FlightGear versions.}} | It is '''instead recommended''' that you use the <code>{{{newapi|bar()}}}</code> API. Alternatively a wrapping helper class can be used to handle low-level APIs, which is the recommended way to support multiple FlightGear versions.}}<noinclude> | ||
< | {{Informative template|1= | ||
__NOTOC__ | |||
== Goal == | |||
This template can be used to caution about that improper use of a low-level Nasal API may cause resource leaks. | |||
== Usage == | |||
This template is meant for use within a section. | |||
<nowiki>{{</nowiki>'''leaking Nasal disclaimer''' | |||
<nowiki>|</nowiki> ''oldapi'' = | |||
<nowiki>|</nowiki> ''newapi'' = | |||
<nowiki>}}</nowiki> | |||
Both parameters are optional. It is possible to use links to the APIs. | |||
; oldapi: Older low-level API. Defaults to '''foo()'''. | |||
; newapi: Newer high-level API. Defaults to '''bar()'''. | |||
}} | |||
[[Category:Messagebox templates]] | [[Category:Messagebox templates]] | ||
</noinclude> | </noinclude> |
Latest revision as of 11:30, 10 January 2015
Caution Improper use of the foo() API may cause resource leaks.
This typically is caused by the low-level nature of such code, requiring manual tracking of listeners and timers and manual reset and re-init handling. It is instead recommended that you use the |
The following template description is not displayed when the template is inserted in an article.
Goal
This template can be used to caution about that improper use of a low-level Nasal API may cause resource leaks.
Usage
This template is meant for use within a section.
{{leaking Nasal disclaimer | oldapi = | newapi = }}
Both parameters are optional. It is possible to use links to the APIs.
- oldapi
- Older low-level API. Defaults to foo().
- newapi
- Newer high-level API. Defaults to bar().