on 2024 Sep 20 10:53 AM
Hi
I trying to use SAP ADBC to connect to an external database. So I read documentation and see some warnings about the risk of memory leak.
Usually when I write ABAP programs I more or less rely on the standard garbage collection that frees memory when a program is exit'et.
However if I have a program that is not really exiting for a longer period and the user can repeatedly call a method that creates object instances I guess it would be a good idea to free this instances when they are no longer in use.
The ADBC documentation contains some programming examples and they contains code I doesn't know how works memory wise.
NEW cl_sql_statement( con_ref = con_ref )->execute_ddl( create_string ).
As I understands this compact syntax an object instance of cl_sql_statement is created and the method execute_dll is executed.
But when is the instance of cl_sql_statement freed again. The instance doesn't have a name, so I have no handle I can use in a free command.
Request clarification before answering.
User | Count |
---|---|
73 | |
21 | |
9 | |
8 | |
7 | |
6 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.