WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

UDF - UDS Library
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

User Defined Function - memory usage

Keywords:   User Defined Function - memory usage 

Question:

If a UDF is called many, many times will it reuse memory or will it eventually run out. Is the DROP command required, or is it automatic on return.

Answer:

In general, variables do not need to be dropped.

However if you open files, they should be closed. If you open OLE handles, they should be closed. If you allocate binary buffers, they should be freed.

In general there are not problems and it does not run out of memoery.

Of couse if the UDF calls itself, and becomes a recursice UDF, there is a limit as to how deep it can go.

Basically you can possibly get into memory trouble with a UDF, but the problem will not be the UDF itself, but rather some peculiar thing that you are doing within the UDF.


Article ID:   W15742
File Created: 2003:05:13:11:29:54
Last Updated: 2003:05:13:11:29:54