Skip to content
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

gettextcombined only gets textcombined object and not the texttable and textorientation separately #175

Open
zshaheen opened this issue Apr 12, 2017 · 7 comments
Milestone

Comments

@zshaheen
Copy link

If we have a texttable and textorientation object (both named diff_min_label), the following does not work:

vcs_canvas.gettextcombined(Tt_name_src = 'diff_min_label', To_name_src = 'diff_min_label)

@zshaheen
Copy link
Author

@doutriaux1 The solution you talked about, fixing gettextcombined() to return a textcombined from the texttable and textorientation might not work.

scriptrun() (or script_save(), forgot what it was called?) doesn't save a textcombined. Instead, it saves it as a texttable and textorientation. I think scriptrun() needs to modified to save a textcombined. Otherwise, you're still gonna have to create a textcombined in gettextcombined.

We can talk more in real life when you come back.

@doutriaux1
Copy link
Contributor

@zshaheen yes but only once.

@zshaheen
Copy link
Author

@doutriaux1 Oh, I get it. So I'm guessing that all of the get functions (getisofill()) also create objects as well, but only once. Makes sense.

@doutriaux1
Copy link
Contributor

they return the object in the vcs.elements dictionary.

@doutriaux1
Copy link
Contributor

@zshaheen I'm thinking of a way we could completely remove that vcs.elements while not breaking backward compatibility

@zshaheen
Copy link
Author

@doutriaux1 Since you're using the dictionary as a cache, the objects will not be garbage collected b/c the # of references will always be at least one.

You should really use WeakKeyDictionary or WeakValueDictionary from the builtin weakref module. This will fix that problem, and hopefully some of the related memory problems.

@doutriaux1
Copy link
Contributor

unless we define their del and have it run vcs.removeobject

@doutriaux1 doutriaux1 modified the milestone: 3.0 May 5, 2017
@doutriaux1 doutriaux1 modified the milestones: 3.0, post 3.0 Mar 29, 2018
@doutriaux1 doutriaux1 modified the milestones: 8.1, 8.2 Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants