Re: destructor
- Posted by jeremy (admin) Mar 15, 2009
- 933 views
I think it is a show stopper because going forward, once PBR is in 4.1, the usage of map (and stack) will change, thus we will have a code break in 4.1 because of the introduction of maps into 4.0.
I can't see how the usage will change? Can you give me an example of what you mean?
A typical usage of map would go something like ...
custrec = new() -- Create a new map . . . put(custrec, "Name", "Joe Blow") put(custrec, "Address", "555 High Street") put(custrec, "Phone", 555675632) . . . name = get(custrec, "Name") . . . delete(map)
And stacks are the same thing.
PBR will not force this usage to change, as far as I can see. The underlying implementation will change but the API shouldn't have to change. What am I overlooking? I know that the delete() call might be superfluous in most cases but its not wrong.
I believe we will no longer have to call delete because map/stack will not have to allocate/manage it's own item in a sequences table? Thus, custrec will be the actual map sequence, not just a pointer to the internal id of the map structure it's using?
Jeremy