New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vcs.removeobject doex NOT error exit if trying to remove a non vcs object #234

Closed
doutriaux1 opened this Issue Aug 21, 2017 · 6 comments

Comments

Projects
None yet
3 participants
@doutriaux1
Member

doutriaux1 commented Aug 21, 2017

but rather prints to the screen

In [1]: import EzTemplate

In [2]: M=EzTemplate.Multi(rows=3,columns=3)

In [3]: M.get()
Out[3]: <vcs.template.P at 0x7f910a927bb0>

In [4]: vcs.removeobject(M)
Out[4]: 'This is not a template, graphics method, or secondary method object.'

Should we error exit?

reported by @lee1043
please @durack1 and @danlipsa let me know what you think

@doutriaux1 doutriaux1 self-assigned this Aug 21, 2017

@doutriaux1 doutriaux1 added this to the 3.0 milestone Aug 21, 2017

@durack1

This comment has been minimized.

Member

durack1 commented Aug 21, 2017

@doutriaux1 I would vote an "error" message yields and error response - so 👍 your suggestion

@durack1

This comment has been minimized.

Member

durack1 commented Aug 21, 2017

@doutriaux1 I'd actually be interested to know what methods are available in vcs. it might be a good time to remove a bunch of redundant functions..?

doutriaux1 added a commit that referenced this issue Aug 21, 2017

@jypeter

This comment has been minimized.

jypeter commented Aug 22, 2017

I did not even know about this function... Would you get the same result with a standard del(M)?

When I want to explicitly delete a big numpy or MV2 array (before the end of a script), I just use del(my_bulky_array) and I don't need a cdms2.removeobject. I hope using del works!

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Aug 22, 2017

@jypeter I am 99% certain del(vcsobj) won't clean it from vcs memory.

@jypeter

This comment has been minimized.

jypeter commented Aug 22, 2017

Oh, OK.

What about using del on numpy arrays or cdms2 objects (sorry if this is not related to this thread)? I have sometimes told people to use that to remove temporary/intermediate data when they had memory issues, but I have never checked if it actually worked

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Aug 22, 2017

yes no issue with numpy arrays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment