You could set up the new() method of the GMS class such that it returns a reference to a pooled (pool of one in this case perhaps) instance of the class. If no instance exists, then one is created and placed in the pool. Then later when the GMS::MemberFile is instantiated you can call the GMS->new() and get a reference back. Doing this will allow you to use one instance in a couple of different places.
Another thing you might want to consider is whether your class design would be better off using inheritance. Without actual code I don't know whether this is the situation or not, but it might be worth entertaining.
In reply to Re: Same object, different packages
by Sifmole
in thread Same object, different packages
by Flame
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |