Apama 10.3.1 | Apama Documentation | Developing Apama Applications | Developing Apama Applications in EPL | Working with Streams and Stream Queries | Defining streams | Terminating streams
 
Terminating streams
If a stream goes out of scope, it continues to exist until the monitor instance terminates or the stream is explicitly terminated in some fashion. Streams are not garbage-collected. This means it is possible to leak streams, thereby consuming memory and potentially performing unnecessary computation, if you do not explicitly terminate streams.
To terminate a stream, call the quit() method on a stream variable that refers to the stream you want to terminate. For example:
stream<integer> foo := all A();
...
foo.quit();
This might also terminate connected streams. See Stream network lifetime. It is also possible to terminate connected streams by quitting a stream listener.

Copyright © 2013-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.