When to consider using global shared objects
- Last Updated: August 3, 2023
- 3 minute read
- OpenEdge
- Version 13.0
- Documentation
You might think that global shared objects are a better way to go in new applications than non
global shared objects, because multiple procedures that are not necessarily running in a
single predictable procedure call stack can all access them. Also, any of the procedures
can define them first and others can define them and use them in any order. Thus, you
could place a set of global definitions into an include file and include it in every
procedure that needs them, without regard for which procedure has to use the
NEW keyword in its definitions.
Up to a point this is correct, but there are good reasons why you should generally avoid
global shared objects in new applications:
Thus, it is generally advisable that you should avoid global objects wherever possible.
If you do think you want to use them, consider these important guidelines: