Re: Can arrayptr_freelin() cause a memory leak?

2020-12-15 Thread d4v3y_5c0n3s
That honestly sounds amazing!  I had no idea ATS3's improved template 
support would be capable of something as powerful as that.  Thanks, and 
keep up the great work! :)

On Tuesday, December 15, 2020 at 12:34:55 PM UTC-5 gmhwxi wrote:

> >>Okay, so what you are saying is that in order for the code to compile, I 
> will need to implement the template for the given type.
>
> That's right.
>
> Hopefully, such a template can be automatically generated in ATS3 based on 
> the given (or inferred) type
> information. There should be a substantial component in ATS3 to support 
> this kind of type-based meta-programming.
>
> On Tue, Dec 15, 2020 at 11:43 AM d4v3y_5c0n3s  wrote:
>
>> Okay, so what you are saying is that in order for the code to compile, I 
>> will need to implement the template for the given type.  That makes sense, 
>> thanks for the explanation! :)
>>
>> On Tuesday, December 15, 2020 at 10:57:09 AM UTC-5 gmhwxi wrote:
>>
>>> It should not as arrayptr_freelin calls array_uninitize$clear to free 
>>> all the stored elements.
>>> It is your obligation to implement the latter.
>>>
>>>
>>> On Tue, Dec 15, 2020 at 9:54 AM d4v3y_5c0n3s  wrote:
>>>
 I just have a question about using arrayptr_freelin() (which frees 
 an arrayptr that contains a vt@ype.)  I have an arrayptr which contains 
 datavtypes, and these datavtypes act like a list in that they can contain 
 a 
 reference to another of the same datavtype.  The typechecker lets me 
 simply 
 call arrayptr_freelin() on the arrayptr, but does this cause a memory 
 leak?  Do I need to free the individual datavtypes first?
 I can provide a code example if anyone reading this doesn't 
 understand what I am talking about.  The types and functions that I am 
 using are all in the prelude.

 -- 
 You received this message because you are subscribed to the Google 
 Groups "ats-lang-users" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to ats-lang-user...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/ats-lang-users/84121c93-a043-405c-be86-e7cc74903f68n%40googlegroups.com
  
 
 .

>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "ats-lang-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to ats-lang-user...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ats-lang-users/b6d0bb1a-cfa2-4c1d-aca5-3d669d827016n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ats-lang-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/108e4197-5274-43cc-9a00-dbe7efc35e66n%40googlegroups.com.


Re: Can arrayptr_freelin() cause a memory leak?

2020-12-15 Thread Hongwei Xi
>>Okay, so what you are saying is that in order for the code to compile, I
will need to implement the template for the given type.

That's right.

Hopefully, such a template can be automatically generated in ATS3 based on
the given (or inferred) type
information. There should be a substantial component in ATS3 to support
this kind of type-based meta-programming.

On Tue, Dec 15, 2020 at 11:43 AM d4v3y_5c0n3s  wrote:

> Okay, so what you are saying is that in order for the code to compile, I
> will need to implement the template for the given type.  That makes sense,
> thanks for the explanation! :)
>
> On Tuesday, December 15, 2020 at 10:57:09 AM UTC-5 gmhwxi wrote:
>
>> It should not as arrayptr_freelin calls array_uninitize$clear to free all
>> the stored elements.
>> It is your obligation to implement the latter.
>>
>>
>> On Tue, Dec 15, 2020 at 9:54 AM d4v3y_5c0n3s  wrote:
>>
>>> I just have a question about using arrayptr_freelin() (which frees
>>> an arrayptr that contains a vt@ype.)  I have an arrayptr which contains
>>> datavtypes, and these datavtypes act like a list in that they can contain a
>>> reference to another of the same datavtype.  The typechecker lets me simply
>>> call arrayptr_freelin() on the arrayptr, but does this cause a memory
>>> leak?  Do I need to free the individual datavtypes first?
>>> I can provide a code example if anyone reading this doesn't
>>> understand what I am talking about.  The types and functions that I am
>>> using are all in the prelude.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "ats-lang-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to ats-lang-user...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ats-lang-users/84121c93-a043-405c-be86-e7cc74903f68n%40googlegroups.com
>>> 
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "ats-lang-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ats-lang-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ats-lang-users/b6d0bb1a-cfa2-4c1d-aca5-3d669d827016n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ats-lang-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLr23TN7MhK3nyGczRpJw%2B-WQM%3Dwz%2Bpp-jEG2Dvf-UVGHQ%40mail.gmail.com.


Re: Can arrayptr_freelin() cause a memory leak?

2020-12-15 Thread d4v3y_5c0n3s
Okay, so what you are saying is that in order for the code to compile, I 
will need to implement the template for the given type.  That makes sense, 
thanks for the explanation! :)

On Tuesday, December 15, 2020 at 10:57:09 AM UTC-5 gmhwxi wrote:

> It should not as arrayptr_freelin calls array_uninitize$clear to free all 
> the stored elements.
> It is your obligation to implement the latter.
>
>
> On Tue, Dec 15, 2020 at 9:54 AM d4v3y_5c0n3s  wrote:
>
>> I just have a question about using arrayptr_freelin() (which frees an 
>> arrayptr that contains a vt@ype.)  I have an arrayptr which contains 
>> datavtypes, and these datavtypes act like a list in that they can contain a 
>> reference to another of the same datavtype.  The typechecker lets me simply 
>> call arrayptr_freelin() on the arrayptr, but does this cause a memory 
>> leak?  Do I need to free the individual datavtypes first?
>> I can provide a code example if anyone reading this doesn't 
>> understand what I am talking about.  The types and functions that I am 
>> using are all in the prelude.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "ats-lang-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to ats-lang-user...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ats-lang-users/84121c93-a043-405c-be86-e7cc74903f68n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ats-lang-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/b6d0bb1a-cfa2-4c1d-aca5-3d669d827016n%40googlegroups.com.


Re: Can arrayptr_freelin() cause a memory leak?

2020-12-15 Thread Hongwei Xi
It should not as arrayptr_freelin calls array_uninitize$clear to free all
the stored elements.
It is your obligation to implement the latter.


On Tue, Dec 15, 2020 at 9:54 AM d4v3y_5c0n3s  wrote:

> I just have a question about using arrayptr_freelin() (which frees an
> arrayptr that contains a vt@ype.)  I have an arrayptr which contains
> datavtypes, and these datavtypes act like a list in that they can contain a
> reference to another of the same datavtype.  The typechecker lets me simply
> call arrayptr_freelin() on the arrayptr, but does this cause a memory
> leak?  Do I need to free the individual datavtypes first?
> I can provide a code example if anyone reading this doesn't understand
> what I am talking about.  The types and functions that I am using are all
> in the prelude.
>
> --
> You received this message because you are subscribed to the Google Groups
> "ats-lang-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ats-lang-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ats-lang-users/84121c93-a043-405c-be86-e7cc74903f68n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ats-lang-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLphUMfuFkR2UVPCTFYycDtTA4%2BXyySA2iuQm3ytButYQA%40mail.gmail.com.


Can arrayptr_freelin() cause a memory leak?

2020-12-15 Thread d4v3y_5c0n3s
I just have a question about using arrayptr_freelin() (which frees an 
arrayptr that contains a vt@ype.)  I have an arrayptr which contains 
datavtypes, and these datavtypes act like a list in that they can contain a 
reference to another of the same datavtype.  The typechecker lets me simply 
call arrayptr_freelin() on the arrayptr, but does this cause a memory 
leak?  Do I need to free the individual datavtypes first?
I can provide a code example if anyone reading this doesn't understand 
what I am talking about.  The types and functions that I am using are all 
in the prelude.

-- 
You received this message because you are subscribed to the Google Groups 
"ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ats-lang-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/84121c93-a043-405c-be86-e7cc74903f68n%40googlegroups.com.