Search found 7 matches

by danilocoelho
Sun Apr 01, 2018 10:23 pm
Forum: Coding Questions
Topic: Detect memory leak using valgrind
Replies: 1
Views: 1332

Re: Detect memory leak using valgrind

As I said before, I checked out more PureBasic commands with memory leak.
Many of the leaks are not as expressive in the amount of memory, but the valgrind detects all these errors and presents them.
This makes it difficult to track memory leaks in our own purebasic code.
Of course, the ideal would ...
by danilocoelho
Sun Mar 25, 2018 4:26 pm
Forum: Coding Questions
Topic: Add a map element on access the map with new key
Replies: 11
Views: 3444

Re: Add a map element on access the map with new key

In this topic I'm use valgrind for detect memory leak.

I investigated this bug with this example of code:


Structure MyStruc
Foo.s
List dependencies.MyStruc()
EndStructure

Procedure main()
If OpenConsole()
PrintN("Basic program...")
Protected NewMap MyMap.MyStruc()
Protected *new_map ...
by danilocoelho
Sun Mar 25, 2018 5:11 am
Forum: Coding Questions
Topic: Detect memory leak using valgrind
Replies: 1
Views: 1332

Detect memory leak using valgrind

I'm trying detect memory leak in an console app running on linux.

I'm using PureBasic 5.62 (Linux - x64) in this case.

However, valgrind generate lot information.
Inclusive some procedures of PureBasic.

So, i wrote a basic program that pass in valgrind.

Procedure main()
If OpenConsole ...
by danilocoelho
Wed Mar 14, 2018 7:18 pm
Forum: Feature Requests and Wishlists
Topic: HTTP POST and custom headers for HTTP request
Replies: 9
Views: 5523

Re: HTTP POST and custom headers for HTTP request

SparrowhawkMMU wrote:+1

For true REST we also need PUT, PATCH and DELETE HTTP verbs/methods.
+1
by danilocoelho
Tue Mar 06, 2018 12:52 am
Forum: Coding Questions
Topic: Add a map element on access the map with new key
Replies: 11
Views: 3444

Re: Add a map element on access the map with new key

Thank you nco2k for your objectivity.

My opinion is also that this is a bug.
However, because I am a newbie user in the forum I prefer to expose the situation before reporting.

By the way, how to report the bug?
Can anyone test on Mac OS and Windows?

Structure MyStruc
Foo.b
EndStructure ...
by danilocoelho
Mon Mar 05, 2018 10:32 am
Forum: Coding Questions
Topic: Add a map element on access the map with new key
Replies: 11
Views: 3444

Re: Add a map element on access the map with new key

Define *brazil.Country_ = AddMapElement(Country(),"BR")

Micoute, thank you for replying.

I understand that by using AddMapElement explicitly there is no problem.
This is not the point I am proposing to discuss.

I recognize that I am trying to add an element to the map in an undocumented way ...
by danilocoelho
Sun Mar 04, 2018 4:33 pm
Forum: Coding Questions
Topic: Add a map element on access the map with new key
Replies: 11
Views: 3444

Add a map element on access the map with new key

This example of code is based in help AddMapElement().
I'm use PureBasic 5.62 (Linux - x64).

Please see my question in the code comments.


Structure Country_
name.s
continent.s
EndStructure

NewMap Country.Country_()

; Regular way to add an element
With Country("US")
\name = "United States ...