Thanks to visit codestin.com
Credit goes to github.com

Skip to content

memoryleak for float #146

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

Closed
roarlarsen opened this issue Feb 10, 2016 · 9 comments
Closed

memoryleak for float #146

roarlarsen opened this issue Feb 10, 2016 · 9 comments

Comments

@roarlarsen
Copy link

detected memory leak in converter.cs - ToPrimitive function

missing Runtime.Decref(op); at line 581

@den-run-ai
Copy link
Contributor

@roarlarsen thank you for spotting this, so do you mean something like this:

#147

@roarlarsen
Copy link
Author

hi,

I didn't check out the develop version, only the master, so I see the line

581 I refer to should have been

~688, the leak is for float type, the decref is missing.

But, the code you suggest is an possible memleak as well in case the char
value is out of range (rarely though)

Roar Larsen

TORDIVEL AS
Postboks 1209, Sluppen
N-7462 Trondheim, Norway
Tel : +47 9151 0203 Fax : + 47 2315 8701

E-mail : [email protected] Web : http://www.tordivel.no

...... THE VISION SOFTWARE HOUSE

On 11 February 2016 at 01:22, denfromufa [email protected] wrote:

@roarlarsen https://github.com/roarlarsen thank you for spotting this,
so do you mean something like this:

#147 #147


Reply to this email directly or view it on GitHub
#146 (comment)
.

@roarlarsen
Copy link
Author

few more observations in develop version.....

there are several IFDEF's PYTHONnn where there seems to be a decref missing

line #653 - int err = Runtime.PyObject_Compare(check, op);

the op object is decref'ed at line #647 - small risk of GC deletion op
inbetween
line #647 and #653, but...

Roar Larsen

TORDIVEL AS
Postboks 1209, Sluppen
N-7462 Trondheim, Norway
Tel : +47 9151 0203 Fax : + 47 2315 8701

E-mail : [email protected] Web : http://www.tordivel.no

...... THE VISION SOFTWARE HOUSE

On 11 February 2016 at 08:35, Roar Larsen [email protected] wrote:

hi,

I didn't check out the develop version, only the master, so I see the line

581 I refer to should have been

~688, the leak is for float type, the decref is missing.

But, the code you suggest is an possible memleak as well in case the char
value is out of range (rarely though)

Roar Larsen


TORDIVEL AS
Postboks 1209, Sluppen
N-7462 Trondheim, Norway
Tel : +47 9151 0203 Fax : + 47 2315 8701
E-mail : [email protected] Web : http://www.tordivel.no


...... THE VISION SOFTWARE HOUSE


On 11 February 2016 at 01:22, denfromufa [email protected] wrote:

@roarlarsen https://github.com/roarlarsen thank you for spotting this,
so do you mean something like this:

#147 #147


Reply to this email directly or view it on GitHub
#146 (comment)
.

@den-run-ai
Copy link
Contributor

@roarlarsen @tonyroberts thanks again, do you agree with these changes:

#147

@roarlarsen
Copy link
Author

Looks fine

What is current status of this project, don't see too many references to
pythonnet on
the web but I think it is great for embedding .net controls into our
application written in Delphi via the embedded pythonengine?

Roar Larsen
[email protected]

@roarlarsen https://github.com/roarlarsen @tonyroberts
https://github.com/tonyroberts thanks again, do you agree with these
changes:

#147 #147


Reply to this email directly or view it on GitHub
#146 (comment)
.

@den-run-ai
Copy link
Contributor

There is python.net tag on stackoverflow
http://stackoverflow.com/questions/tagged/python.net, mailing list at
https://mail.python.org/pipermail/pythondotnet/

What else do you think is missing?

can you share minimal code with delphi, how is it related to .NET?

On Thursday, February 11, 2016, Roar Larsen [email protected]
wrote:

Looks fine

What is current status of this project, don't see too many references to
pythonnet on
the web but I think it is great for embedding .net controls into our
application written in Delphi via the embedded pythonengine?

Roar Larsen
[email protected] javascript:_e(%7B%7D,'cvml','[email protected]');

@roarlarsen https://github.com/roarlarsen @tonyroberts
https://github.com/tonyroberts thanks again, do you agree with these
changes:

#147 #147


Reply to this email directly or view it on GitHub
<
https://github.com/pythonnet/pythonnet/issues/146#issuecomment-183080693>
.


Reply to this email directly or view it on GitHub
#146 (comment)
.

@den-run-ai
Copy link
Contributor

forgot to mention ironpython docs and even book which are mostly applicable
to python.net, but you can also use many other packages like numpy, scipy.

On Thursday, February 11, 2016, Denis Akhiyarov [email protected]
wrote:

There is python.net tag on stackoverflow
http://stackoverflow.com/questions/tagged/python.net, mailing list at
https://mail.python.org/pipermail/pythondotnet/

What else do you think is missing?

can you share minimal with delphi, how is it related to .NET?

On Thursday, February 11, 2016, Roar Larsen <[email protected]
javascript:_e(%7B%7D,'cvml','[email protected]');> wrote:

Looks fine

What is current status of this project, don't see too many references to
pythonnet on
the web but I think it is great for embedding .net controls into our
application written in Delphi via the embedded pythonengine?

Roar Larsen
[email protected]

@roarlarsen https://github.com/roarlarsen @tonyroberts
https://github.com/tonyroberts thanks again, do you agree with these
changes:

#147 #147


Reply to this email directly or view it on GitHub
<
https://github.com/pythonnet/pythonnet/issues/146#issuecomment-183080693>
.


Reply to this email directly or view it on GitHub
#146 (comment)
.

@roarlarsen
Copy link
Author

I'm aware of the stackoverflow thread, but I miss some more python samples
for clr usage/tips/hints.

We have a native delphi application with an embedded python engine so we
can run python scripts within
the application. The application adds a module to the python
environment/room so you get access to the
inner kernel of the application, data, objects, resources etc. The user can
write project specific python code
inside the application, and in these scripts we imports clr and the .net
environment.

We are machine vision company, and we're using opencv, numpy, scipi and
many other python libraries in
addition to C/C++ and delphi libraries. Currently we are developing some
new image processing algorithms
based on .Net, so we use pythonnet to embed .net C# classes into the
application.

Roar Larsen

TORDIVEL AS
Postboks 1209, Sluppen
N-7462 Trondheim, Norway
Tel : +47 9151 0203 Fax : + 47 2315 8701

E-mail : [email protected] Web : http://www.tordivel.no

...... THE VISION SOFTWARE HOUSE

On 12 February 2016 at 04:06, denfromufa [email protected] wrote:

There is python.net tag on stackoverflow
http://stackoverflow.com/questions/tagged/python.net, mailing list at
https://mail.python.org/pipermail/pythondotnet/

What else do you think is missing?

can you share minimal with delphi, how is it related to .NET?

On Thursday, February 11, 2016, Roar Larsen [email protected]
wrote:

Looks fine

What is current status of this project, don't see too many references to
pythonnet on
the web but I think it is great for embedding .net controls into our
application written in Delphi via the embedded pythonengine?

Roar Larsen
[email protected] javascript:_e(%7B%7D,'cvml','[email protected]');

@roarlarsen https://github.com/roarlarsen @tonyroberts
https://github.com/tonyroberts thanks again, do you agree with these
changes:

#147 #147


Reply to this email directly or view it on GitHub
<
#146 (comment)

.


Reply to this email directly or view it on GitHub
<
https://github.com/pythonnet/pythonnet/issues/146#issuecomment-183094589>
.


Reply to this email directly or view it on GitHub
#146 (comment)
.

@den-run-ai
Copy link
Contributor

@roarlarsen I assume you have seen this tutorial:

http://pythonnet.github.io/readme.html

also this ironpython tutorial:

http://ironpython.net/documentation/dotnet/

Perhaps someone can turn this into ipython notebook.

tonyroberts pushed a commit to tonyroberts/pythonnet that referenced this issue Feb 15, 2016
tonyroberts pushed a commit to tonyroberts/pythonnet that referenced this issue Feb 15, 2016
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

3 participants